SMRPA07100_월별경조사등록.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  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. <congraamtreqlist>
  11. <baseym/>
  12. <congraymd/>
  13. <emplno/>
  14. <emplnm/>
  15. <utplceinst/>
  16. <dutplcedeptnm/>
  17. <rregno/>
  18. <famyname/>
  19. <famyrel/>
  20. <cmt/>
  21. <seqno/>
  22. <dutplcedeptcd/>
  23. </congraamtreqlist>
  24. </main>
  25. <send>
  26. <search>
  27. <dutplceinst/>
  28. <baseym/>
  29. <emplno/>
  30. <emplnm/>
  31. <emplno_g/>
  32. <famydoduyn/>
  33. <workgbn/>
  34. </search>
  35. <savelist>
  36. <congraamtreqlist/>
  37. </savelist>
  38. </send>
  39. <init>
  40. <checkbox1>
  41. <label>중복여부</label>
  42. <value>Y</value>
  43. </checkbox1>
  44. <systemflag/>
  45. </init>
  46. <temp/>
  47. <dataynlist>
  48. <baseamtyn/>
  49. <requestyn/>
  50. <creatyn/>
  51. <endyn/>
  52. <payrefltyn/>
  53. </dataynlist>
  54. </root>
  55. </instance>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. fInitialize();
  59. misfGridInit(grd_congraamtreqlist);
  60. misfMsterDetailSet(grd_congraamtreqlist,null,"TRRPA07101","Y");
  61. btn_save.disabled = !(checkAuth("X"));
  62. // 공통코드 바인딩 silver
  63. misfComboComCdList('Z0007', cmb_dutplceinst,"Y");
  64. //misfComboComCdList('Z0007', grd_congraamtreqlist.dutplceinst,"");
  65. misfComboInstCdListMulti("grd_congraamtreqlist.dutplceinst",getCurrentDate(),"","Y");
  66. // misfComboCopyItemSet(cmb_dutplceinst, "", grd_congraamtreqlist, "dutplceinst");
  67. // var dutplceinst = getUserInfo("dutplceinstcd");
  68. // cmb_dutplceinst.value=dutplceinst;
  69. if (getUserInfo("dutplceinstcd") == "017") {
  70. cmb_dutplceinst.value = "017";
  71. cmb_dutplceinst.disabled = true;
  72. }
  73. btn_search.dispatch("DOMActivate");
  74. ipt_systemflag.value = "C";
  75. ]]>
  76. </script>
  77. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  78. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  79. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  80. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  81. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  82. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  83. <script type="javascript">
  84. <![CDATA[
  85. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  86. function fInitialize() {
  87. model.removeNodeset("/root/main/congraamtreqlist");
  88. model.resetInstanceNode("/root/send");
  89. model.refresh();
  90. // var dutplceinst = getUserInfo("dutplceinstcd");
  91. // cmb_dutplceinst.value=dutplceinst;
  92. var curDate = getCurrentDate().toDate();
  93. model.setValue("/root/send/search/baseym", curDate.getDateFormat('YYYYMM'));
  94. }
  95. function fsaveCheckValue(){
  96. var iInsCnt = 0;
  97. var iDupCnt = 0;
  98. var bDel = false;
  99. var icolidx=grd_congraamtreqlist.colRef("congraymd");
  100. var icolidx1=grd_congraamtreqlist.colRef("emplno");
  101. var icolidx2=grd_congraamtreqlist.colRef("rregno");
  102. for(var i=0; i<grd_congraamtreqlist.rows; i++)
  103. {
  104. if(grd_congraamtreqlist.rowStatus(i) == 1 || grd_congraamtreqlist.rowStatus(i) == 3)
  105. {
  106. iInsCnt = i;
  107. break;
  108. }
  109. }
  110. for(var i=iInsCnt; i<grd_congraamtreqlist.rows; i++)
  111. {
  112. for(var j=1; j<i; j++)
  113. {
  114. if(grd_congraamtreqlist.valueMatrix(i, icolidx) == grd_congraamtreqlist.valueMatrix(j, icolidx) && grd_congraamtreqlist.valueMatrix(i, icolidx1) == grd_congraamtreqlist.valueMatrix(j, icolidx1) && grd_congraamtreqlist.valueMatrix(i, icolidx2) == grd_congraamtreqlist.valueMatrix(j, icolidx2))
  115. {
  116. if(grd_congraamtreqlist.rowStatus(i) == 1 || grd_congraamtreqlist.rowStatus(i) == 3)
  117. { var ret= messageBox("중복된 행을 삭제", "Q001");
  118. if (ret != 6) { // not OK
  119. bDel = false;
  120. return false;
  121. }else{
  122. grd_congraamtreqlist.deleteItem(i);
  123. iDupCnt++;
  124. bDel = true;
  125. }
  126. }
  127. }
  128. }
  129. if(bDel)
  130. {
  131. bDel = false;
  132. i--;
  133. }
  134. }
  135. if(iDupCnt > 0)
  136. {
  137. messageBox("[ " + iDupCnt + " ]" + " 건의 중복된 행이 삭제", "I001");
  138. }
  139. return true;
  140. }
  141. ]]>
  142. </script>
  143. <submission id="TRRPA07101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/congraamtreqlist"/>
  144. <submission id="TXRPA07101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savelist" resultref="/root/temp"/>
  145. <submission id="TXRPA07102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/temp"/>
  146. <submission id="TRRPA07102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/dataynlist"/>
  147. </model>
  148. </xhtml:head>
  149. <xhtml:body style="margin-left:8; margin-right:8; ">
  150. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  151. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">월별경조사등록</caption>
  152. </group>
  153. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  154. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:35px; "/>
  155. <caption id="cap_dutplceinst" class="search_name" style="left:215px; top:19px; width:86px; height:17px; ">기 관 :</caption>
  156. <button id="btn_search" class="btn1_letter2" style="left:1125px; top:16px; width:56px; height:22px; ">
  157. <caption>조회</caption>
  158. <script type="javascript" ev:event="DOMActivate">
  159. <![CDATA[
  160. if(!isRequiredControls("ipt_baseym"))return;
  161. //var famydoduyn=model.getValue("/root/send/search/famydoduyn");
  162. //if(famydoduyn =='Y'){
  163. // model.setValue("/root/send/search/baseym","");
  164. //}
  165. submit("TRRPA07101");
  166. ]]>
  167. </script>
  168. </button>
  169. <line id="line13" class="line_4" style="x1:1110px; y1:16px; x2:1110px; y2:38px; "/>
  170. <line id="line207" class="line_1" style="x1:0; y1:69; x2:1195; y2:69px; "/>
  171. <datagrid id="grd_congraamtreqlist" nodeset="/root/main/congraamtreqlist" caption="기준년월^사원번호^성 명^근무기관명^근무지부서명^가족관계^가족관계^가족관계^경조사일자^비고|기준년월^사원번호^성 명^근무기관명^근무지부서명^주민등록번호^성명^관계^경조사일자^비고" colsep="^" colwidth="92, 101, 100, 168, 104, 126, 78, 97, 100, 157, 100, 100, 100" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:74px; width:1194px; height:670px; ">
  172. <col ref="baseym" format="yyyy-mm"/>
  173. <col ref="emplno" type="inputbutton" _key="true" style="text-align:center; "/>
  174. <col ref="emplnm" style="text-align:center; "/>
  175. <col id="dutplceinst" disabled="true" ref="dutplceinst" type="combo" _key="true" style="text-align:center; ">
  176. <choices>
  177. <itemset>
  178. <label/>
  179. <value/>
  180. </itemset>
  181. </choices>
  182. </col>
  183. <col ref="dutplcedeptnm"/>
  184. <col ref="rregno" type="inputbutton" format="999999-9999999" _key="true" style="text-align:center; "/>
  185. <col ref="famyname" style="text-align:center; "/>
  186. <col ref="famyrelnm" style="text-align:center; "/>
  187. <col ref="congraymd" type="inputdate" format="yyyy-mm-dd" _key="true" style="text-align:center; "/>
  188. <col imemode="hangul" ref="cmt" type="input"/>
  189. <col ref="seqno" visibility="hidden"/>
  190. <col ref="famyrel" visibility="hidden"/>
  191. <col ref="dutplcedeptcd" visibility="hidden"/>
  192. <script type="javascript" ev:event="onbuttonclick">
  193. <![CDATA[
  194. if (grd_congraamtreqlist.col == 2) {//사원번호 버튼을 눌렀을 때
  195. var recv_list = "emplno,emplnm,dutplceinst,dutplcedeptcd,dutplcedeptnm";
  196. //rpbfOpenPopUpList("SPRPB00101", grd_congraamtreqlist, recv_list,"","N","Y");
  197. rpbfOpenPopUpList("SPRPB00101", grd_congraamtreqlist, recv_list,"ipt_systemflag","N");
  198. model.refresh();
  199. }
  200. if (grd_congraamtreqlist.col == 6) {//가족사항 조회
  201. var emplno= grd_congraamtreqlist.valueMatrix(grd_congraamtreqlist.row,2);
  202. if(emplno ==""){
  203. messageBox("해당 사원을 ","C001");
  204. return
  205. }else{
  206. var emplno= grd_congraamtreqlist.valueMatrix(grd_congraamtreqlist.row,2);
  207. ipt_emplno_g.value=emplno;
  208. var recv_list = "rregno,famyname,famyrelnm,famyrel";
  209. misfOpenPopUpList("32", grd_congraamtreqlist,"",recv_list);
  210. model.refresh();
  211. }
  212. }
  213. ]]>
  214. </script>
  215. </datagrid>
  216. <select1 id="cmb_dutplceinst" ref="/root/send/search/dutplceinst" class="combo_s_essential" appearance="minimal" style="left:300px; top:18px; width:190px; height:19px; ">
  217. <choices>
  218. <itemset>
  219. <label/>
  220. <value/>
  221. </itemset>
  222. </choices>
  223. </select1>
  224. <button id="btn_grddel" class="btn2_letter3" style="left:1069px; top:48px; width:53px; height:19px; ">
  225. <caption>행삭제</caption>
  226. <script type="javascript" ev:event="DOMActivate">
  227. <![CDATA[
  228. misfGridIUD(grd_congraamtreqlist,"D");
  229. model.refresh();
  230. ]]>
  231. </script>
  232. </button>
  233. <button id="btn_grdadd" class="btn2_letter3" style="left:1013px; top:48px; width:53px; height:19px; ">
  234. <caption>행추가</caption>
  235. <script type="javascript" ev:event="DOMActivate">
  236. <![CDATA[
  237. misfGridIUD(grd_congraamtreqlist, "A");
  238. var cur_row=grd_congraamtreqlist.row;
  239. ]]>
  240. </script>
  241. </button>
  242. <caption id="caption9" class="tit_2" style="left:0px; top:54px; width:183px; height:14px; ">월별 경조사 내역</caption>
  243. <input id="ipt_baseym" ref="/root/send/search/baseym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:100px; top:18px; width:100px; height:19px; ">
  244. <script type="javascript" ev:event="xforms-value-changed">
  245. <![CDATA[
  246. btn_search.dispatch("DOMActivate");
  247. var instcd = cmb_dutplceinst.value;
  248. if( getStringLength(ipt_baseym.value) == "6" ) {
  249. model.removeNodeset(cmb_dutplceinst.attribute("ref"));
  250. model.makeNode("/root/send/search/dutplceinst");
  251. misfComboInstCdListMulti("cmb_dutplceinst",ipt_baseym.value,"","Y");
  252. cmb_dutplceinst.value = instcd;
  253. model.refresh();
  254. }
  255. ]]>
  256. </script>
  257. </input>
  258. <caption id="cap_baseym" class="search_name" style="left:15px; top:19px; width:91px; height:17px; ">기준년월:</caption>
  259. <input id="ipt_emplnm" ref="/root/send/search/emplnm" class="input_search" navindex="21" style="left:699px; top:18px; width:106px; height:19px; ">
  260. <script type="javascript" ev:event="onkeypress">
  261. <![CDATA[
  262. inputEnterKey("btn_search", "DOMActivate");
  263. ]]>
  264. </script>
  265. </input>
  266. <caption id="cap_emplno" class="search_name" style="left:513px; top:19px; width:99px; height:17px; ">사원번호 :</caption>
  267. <input id="ipt_emplno" ref="/root/send/search/emplno" class="input_search" navindex="20" style="left:604px; top:18px; width:69px; height:19px; ">
  268. <script type="javascript" ev:event="onkeypress">
  269. <![CDATA[
  270. inputEnterKey("btn_search", "DOMActivate");
  271. ]]>
  272. </script>
  273. </input>
  274. <button id="btn_emplsearch" class="icon_search" style="left:679px; top:18px; width:16px; height:16px; ">
  275. <caption/>
  276. <script type="javascript" ev:event="DOMActivate">
  277. <![CDATA[
  278. var recv_list = "emplno,emplnm";
  279. //rpbfOpenPopUpList("SPRPB00101", grd_congraamtreqlist, recv_list,"","N","Y");
  280. rpbfOpenPopUpList("SPRPB00101", ipt_emplno, recv_list,"ipt_systemflag","N");
  281. model.refresh();
  282. ]]>
  283. </script>
  284. </button>
  285. <input id="ipt_emplno_g" ref="/root/send/search/emplno_g" visibility="hidden" style="left:930px; top:20px; width:55px; height:19px; "/>
  286. <select id="ckb_famydoduyn" ref="/root/send/search/famydoduyn" class="checkbox_search" overflow="visible" appearance="full" style="left:825px; top:20px; width:95px; height:15px; ">
  287. <choices>
  288. <itemset nodeset="/root/init/checkbox1">
  289. <label ref="label"/>
  290. <value ref="value"/>
  291. </itemset>
  292. </choices>
  293. </select>
  294. <input id="input1" ref="/root/send/search/workgbn" visibility="hidden" style="left:1000px; top:20px; width:55px; height:19px; "/>
  295. <input id="ipt_systemflag" ref="/root/init/systemflag" visibility="hidden" style="left:1020px; top:20px; width:55px; height:19px; "/>
  296. <button id="btn_saveexcel" class="btn2_letter4" style="left:1125px; top:48px; width:64px; height:19px; ">
  297. <caption>엑셀저장</caption>
  298. <script type="javascript" ev:event="DOMActivate">
  299. <![CDATA[
  300. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  301. if (fileName != "")
  302. {
  303. grd_congraamtreqlist.saveExcel(fileName, "SheetName", true, true, "", "");
  304. }
  305. ]]>
  306. </script>
  307. </button>
  308. </group>
  309. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  310. <line id="line11" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  311. <button id="btn_save" class="btn4_letter2" style="left:1134px; top:3px; width:56px; height:22px; ">
  312. <caption>저장</caption>
  313. <script type="javascript" ev:event="DOMActivate">
  314. <![CDATA[
  315. var updtdata = getGridUpdateData(grd_congraamtreqlist);
  316. if (updtdata == "" ) {
  317. messageBox("변경된 데이터가","I004");
  318. return;
  319. }
  320. var retMes = messageBox("저장 하시겠습니까?", "Q999");
  321. if ( retMes != 6) {
  322. return;
  323. }
  324. submit("TRRPA07102");
  325. var creatyn=model.getValue("/root/dataynlist/creatyn");
  326. if(creatyn =='Y'){
  327. messageBox("공제생성이 완료된 자료는 저장 ","E001");
  328. return;
  329. }
  330. if(!checkKeyColumn("grd_congraamtreqlist"))return;
  331. //if(!fsaveCheckValue())return;
  332. misfSave("TXRPA07101");
  333. ]]>
  334. </script>
  335. </button>
  336. <button id="btn_clear" class="btn4_letter4" style="left:1052px; top:3px; width:80px; height:22px; ">
  337. <caption>생성취소</caption>
  338. <script type="javascript" ev:event="DOMActivate">
  339. <![CDATA[
  340. var updtdata = getGridUpdateData(grd_congraamtreqlist);
  341. if (updtdata != "" ) {
  342. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  343. if (ret != 6) { // not OK
  344. return;
  345. }
  346. }
  347. var retMes = messageBox("생성된 경조금공제자료를 ", "Q007");
  348. if ( retMes != 6) {
  349. return;
  350. }
  351. submit("TRRPA07102");
  352. var creatyn=model.getValue("/root/dataynlist/creatyn");
  353. var endyn= model.getValue("/root/dataynlist/endyn");
  354. var payrefltyn=model.getValue("/root/dataynlist/payrefltyn");
  355. if(creatyn !='Y'){
  356. messageBox("취소할 자료가 ","I004");
  357. return;
  358. }
  359. if(endyn =='Y'){
  360. messageBox("마감된 자료는 취소할 수 ","I004");
  361. return;
  362. }
  363. model.setValue("/root/send/search/workgbn","D");
  364. submit("TXRPA07102");
  365. if (model.getValue(gvErrorMsgPath + "/type") != "error"){
  366. messageBox("경조금 공제취소 작업이 ","I001");
  367. }
  368. ]]>
  369. </script>
  370. </button>
  371. <button id="button1" class="btn4_letter3" style="left:900px; top:3px; width:68px; height:22px; ">
  372. <caption>초기화</caption>
  373. <script type="javascript" ev:event="DOMActivate">
  374. <![CDATA[
  375. var updtdata = getGridUpdateData(grd_congraamtreqlist);
  376. if (updtdata != "" ) {
  377. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  378. if (ret != 6) { // not OK
  379. return;
  380. }
  381. }
  382. fInitialize();
  383. ]]>
  384. </script>
  385. </button>
  386. <button id="button2" class="btn4_letter4" style="left:970px; top:3px; width:80px; height:22px; ">
  387. <caption>공제생성</caption>
  388. <script type="javascript" ev:event="DOMActivate">
  389. <![CDATA[
  390. var updtdata = getGridUpdateData(grd_congraamtreqlist);
  391. if (updtdata != "" ) {
  392. var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
  393. if (ret != 6) { // not OK
  394. return;
  395. }
  396. }
  397. var retMes = messageBox("경조금 공제를 ", "Q004");
  398. if ( retMes != 6) {
  399. return;
  400. }
  401. var dutplceinst = '103';//getUserInfo("dutplceinstcd");
  402. model.setValue("/root/send/search/dutplceinst",dutplceinst);
  403. submit("TRRPA07102");
  404. var baseamtyn=model.getValue("/root/dataynlist/baseamtyn");
  405. var requestyn=model.getValue("/root/dataynlist/requestyn");
  406. var creatyn=model.getValue("/root/dataynlist/creatyn");
  407. var endyn= model.getValue("/root/dataynlist/endyn");
  408. var payrefltyn=model.getValue("/root/dataynlist/payrefltyn");
  409. if(baseamtyn !='Y'){
  410. messageBox("직급별 공제금액이 입력되지 ","E007");
  411. return;
  412. }
  413. if(requestyn !='Y'){
  414. messageBox("생성할 자료가 ","I004");
  415. return;
  416. }
  417. model.setValue("/root/send/search/dutplceinst",'103');
  418. model.setValue("/root/send/search/baseym",ipt_baseym.value);
  419. model.setValue("/root/send/search/workgbn","C");
  420. submit("TXRPA07102");
  421. if (model.getValue(gvErrorMsgPath + "/type") != "error"){
  422. messageBox("경조금 공제생성 작업이 ","I001");
  423. }
  424. ]]>
  425. </script>
  426. </button>
  427. </group>
  428. </xhtml:body>
  429. </xhtml:html>