SMRWD01700_전출자조회.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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>SMRWD01700_전출자조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <carempl>
  12. <carempllist>
  13. </carempllist>
  14. </carempl>
  15. </list>
  16. </main>
  17. <send>
  18. <carempl>
  19. <ym/>
  20. <mngtinstcd/>
  21. <outinstcd/>
  22. </carempl>
  23. <search>
  24. <name/>
  25. <searchflag>name</searchflag>
  26. <count>0</count>
  27. </search>
  28. </send>
  29. <save>
  30. <carempllist>
  31. </carempllist>
  32. </save>
  33. <temp/>
  34. </root>
  35. </instance>
  36. <script type="javascript" ev:event="xforms-ready">
  37. <![CDATA[
  38. misfGridInit(grd_carempl);
  39. misfMsterDetailSet(grd_carempl,null, "TRRWD01701" ,"Y");
  40. misfComboComCdList("R0305", cmb_outinstcd,'N');
  41. grd_carempl.selectionMode = "byrows";
  42. grd_carempl.focusColor = "#ccffcc";
  43. var curdate = getCurrentDate();
  44. model.setValue(ipt_ym.attribute("ref") , curdate.substr(0, 6));
  45. model.setValue("/root/send/carempl/mngtinstcd" , getUserInfo("dutplceinstcd"));
  46. rwcComboMngtinstBase(cmb_instcd,getUserInfo("dutplceinstcd"),model.getValue(ipt_ym.attribute("ref")));
  47. grd_carempl.dataHeight = 19;
  48. grd_carempl.fixedcellcheckbox(0,1) = true; // 그리드에 있는 전체선택 체크박스
  49. model.refresh();
  50. ]]>
  51. </script>
  52. <submission id="TRRWD01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/carempl" resultref="/root/main/list/carempl"/>
  53. <submission id="TXRWD01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save/carempllist" resultref="/root/temp"/>
  54. </model>
  55. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  56. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  59. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  60. <script type="javascript" src="../../../mis/paybaseinfomngtweb/js/RWC001.js"/>
  61. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  62. <script type="javascript" src="../../../mis/paydedufactmngtweb/js/RWD001.js"/>
  63. <script type="javascript">
  64. <![CDATA[
  65. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  66. function fDefaultSetting() {
  67. model.setValue(grd_carempl.nodeset + "["+ (grd_carempl.row - grd_carempl.fixedRows + 1) + "]/mngtinstcd" , model.getValue(cmb_instcd.attribute("ref")));
  68. model.setValue(grd_carempl.nodeset + "["+ (grd_carempl.row - grd_carempl.fixedRows + 1) + "]/yy" , model.getValue(ipt_ym.attribute("ref")));
  69. model.refresh();
  70. }
  71. function fCheckRetrieveData()
  72. {
  73. if(model.getValue(ipt_ym.attribute("ref")).length== 0 ) {
  74. messageBox("해당년도를 " ,"C002");
  75. model.setFocus("ipt_ym");
  76. return false;
  77. }
  78. return true;
  79. }
  80. //이름찾기
  81. function fSearch(pColRef, pValue, pErrorValue, pCount)
  82. {
  83. var endRow = grd_carempl.row;
  84. var endRows = grd_carempl.rows;
  85. var count = 0;
  86. var pStartRow = grd_carempl.fixedRows;
  87. if( (grd_carempl.row+1) == grd_carempl.rows) {
  88. pStartRow = grd_carempl.fixedRows;
  89. }else {
  90. pStartRow = grd_carempl.row+1;
  91. }
  92. for(var i = grd_carempl.fixedRows; i < grd_carempl.rows; i++) {
  93. if(pValue == grd_carempl.valueMatrix(i, grd_carempl.colRef(pColRef))) {
  94. count++;
  95. }
  96. }
  97. pCount.value = count;
  98. for(var i = pStartRow; i <= endRows; i++) {
  99. if(pValue == grd_carempl.valueMatrix(i, grd_carempl.colRef(pColRef))) {
  100. grd_carempl.select(i, 3) = true;
  101. grd_carempl.row = i;
  102. return;
  103. }
  104. if(i == grd_carempl.rows) {
  105. endRows = endRow;
  106. i=0;
  107. }else if(endRow == i) {
  108. messageBox("조회한 " + cmb_search.label + "[" + pErrorValue + "]" + "가 없습니다.", "");
  109. return;
  110. }
  111. }
  112. }
  113. ]]>
  114. </script>
  115. </xhtml:head>
  116. <xhtml:body pagewidth="1100" pageheight="700">
  117. <group id="group1" style="left:0px; top:0px; width:1000px; height:13px; ">
  118. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">전출자조회</caption>
  119. </group>
  120. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1000px; height:562px; ">
  121. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1000px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  122. <button id="btn_search" class="btn1_letter2" style="left:935px; top:17px; width:56px; height:22px; ">
  123. <caption>조회</caption>
  124. <script type="javascript" ev:event="DOMActivate">
  125. <![CDATA[
  126. if (cmb_outinstcd.value == "" ) {
  127. messageBox("전출기관을", "C002");
  128. }
  129. else if( cmb_instcd.value == cmb_outinstcd.value ) {
  130. messageBox("관리기관과 같은 전출기관은 선택","E001"); // E001 = 할 수 없습니다.
  131. model.setFocus("cmb_outinstcd");
  132. }
  133. else {
  134. misfMsterDetailRetrieve();
  135. }
  136. ]]>
  137. </script>
  138. </button>
  139. <line id="line13" class="line_4" style="x1:925px; y1:13px; x2:925px; y2:42px; "/>
  140. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:999px; y2:70px; "/>
  141. <select1 id="cmb_instcd" ref="/root/send/carempl/mngtinstcd" class="combo_s_essential" disabled="false" appearance="minimal" style="left:363px; top:18px; width:127px; height:19px; ">
  142. <choices>
  143. <itemset>
  144. <label/>
  145. <value/>
  146. </itemset>
  147. </choices>
  148. </select1>
  149. <caption id="caption2" class="search_name" style="left:10px; top:19px; width:93px; height:17px; ">년도 :</caption>
  150. <datagrid id="grd_carempl" nodeset="/root/main/list/carempl/carempllist" caption="^순번^사번^성명^연락처^근무상태^직위^급여기관^근무병원^근무부서^스티커번호^차량종류^차량번호^차량번호^비고^변경관리기관|^순번^사번^성명^연락처^근무상태^직위^급여기관^근무병원^근무부서^스티커번호^차량종류^번호1^번호2^비고^변경관리기관" colsep="^" colwidth="30, 35, 58, 50, 78, 60, 65, 95, 95, 80, 70, 55, 50, 40, 82, 100, 100, 100" dataheight="25" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" selectionmode="byrow" tooltip="true" style="left:0px; top:75px; width:1000px; height:485px; ">
  151. <col checkvalue="Y,N" ref="flagyn" type="checkbox"/>
  152. <col ref="seq"/>
  153. <col ref="emplno" type="output" style="text-align:center; "/>
  154. <col ref="name" style="text-align:center; "/>
  155. <col ref="mpphonno"/>
  156. <col ref="preststatcd" style="text-align:center; "/>
  157. <col ref="jobposnm" type="output"/>
  158. <col ref="payinst"/>
  159. <col ref="dutplceinst"/>
  160. <col ref="deptnm"/>
  161. <col ref="stickerno"/>
  162. <col ref="carkind"/>
  163. <col ref="carno1"/>
  164. <col ref="carno2"/>
  165. <col ref="cmd"/>
  166. <col ref="outinstcd"/>
  167. <col ref="yy" visibility="hidden"/>
  168. <col ref="mngtinstcd" visibility="hidden"/>
  169. <script type="javascript" ev:event="onaftersort">
  170. <![CDATA[
  171. grd_carempl.gridToInstance();
  172. ]]>
  173. </script>
  174. </datagrid>
  175. <input id="ipt_ym" ref="/root/send/carempl/ym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:73px; top:18px; width:87px; height:19px; "/>
  176. <caption id="caption3" class="search_name" style="left:265px; top:19px; width:96px; height:17px; ">관 리 기 관:</caption>
  177. <button id="btn_exceldetail" class="btn2_letter4" style="left:931px; top:50px; width:64px; height:19px; ">
  178. <caption>엑셀저장</caption>
  179. <script type="javascript" ev:event="DOMActivate">
  180. <![CDATA[
  181. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  182. if (fileName != "") {
  183. grd_carempl.saveExcel(fileName);
  184. }
  185. ]]>
  186. </script>
  187. </button>
  188. <output id="opt_count" ref="/root/send/search/count" class="output_fix" style="left:860px; top:50px; width:35px; height:19px; color:#ff0000; text-align:center; "/>
  189. <select1 id="cmb_search" ref="/root/send/search/searchflag" appearance="minimal" style="left:658px; top:50px; width:82px; height:19px; text-align:center; ">
  190. <choices>
  191. <item>
  192. <label>이름</label>
  193. <value>name</value>
  194. </item>
  195. <item>
  196. <label>스티커번호</label>
  197. <value>stickerno</value>
  198. </item>
  199. <item>
  200. <label>차량번호</label>
  201. <value>carno2</value>
  202. </item>
  203. </choices>
  204. <script type="javascript" ev:event="xforms-value-changed">
  205. <![CDATA[
  206. if(cmb_search.value == "stickerno") {
  207. ipt_search.attribute("format") = "";
  208. }else if(cmb_search.value == "carno2") {
  209. ipt_search.attribute("format") = "9999999999";
  210. }else {
  211. ipt_search.attribute("format") = "";
  212. }
  213. ipt_search.value = "";
  214. opt_count.value = 0;
  215. model.setFocus("ipt_search");
  216. ]]>
  217. </script>
  218. </select1>
  219. <caption id="caption11" class="search_name" style="left:578px; top:50px; width:85px; height:17px; ">Search :</caption>
  220. <input id="ipt_search" ref="/root/send/search/name" class="input_default" imemode="hangul" style="left:743px; top:50px; width:115px; height:19px; text-align:center; ">
  221. <script type="javascript" ev:event="onkeypress">
  222. <![CDATA[
  223. if(event.keyCode == 13 || event.keyCode == 9 ) {
  224. model.setFocus("grd_carempl");
  225. var pErrorValue = ipt_search.currentText;
  226. ipt_search.refresh();
  227. fSearch(cmb_search.value, ipt_search.value, pErrorValue, opt_count);
  228. model.setFocus("ipt_search");
  229. }
  230. ]]>
  231. </script>
  232. </input>
  233. <select1 id="cmb_outinstcd" ref="/root/send/carempl/outinstcd" class="combo_s_essential" appearance="minimal" style="left:675px; top:18px; width:135px; height:19px; ">
  234. <choices>
  235. <itemset>
  236. <label/>
  237. <value/>
  238. </itemset>
  239. </choices>
  240. <script type="javascript" ev:event="xforms-value-changed">
  241. <![CDATA[
  242. if( cmb_instcd.value == cmb_outinstcd.value ) {
  243. messageBox("관리기관과 같은 전출기관은 선택","E001"); // E001 = 할 수 없습니다.
  244. model.setFocus("cmb_outinstcd");
  245. }
  246. ]]>
  247. </script>
  248. </select1>
  249. <caption id="caption1" class="search_name" style="left:577px; top:19px; width:96px; height:17px; ">전 출 기 관:</caption>
  250. </group>
  251. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1000px; height:27px; ">
  252. <line id="line9" class="line_6" style="x1:0px; y1:25px; x2:1000px; y2:25px; "/>
  253. <button id="btn_paysave" class="btn4_letter2" style="left:941px; top:3px; width:56px; height:22px; ">
  254. <caption>전출</caption>
  255. <script type="javascript" ev:event="DOMActivate">
  256. <![CDATA[
  257. if(!isRequiredControls("ipt_ym"))return;
  258. var retMes = messageBox("대상자를 전출처리 하시겠습니까?", "Q999");
  259. if ( retMes != 6) {
  260. return;
  261. }
  262. for(var i=2; i<grd_carempl.rows; i++) {
  263. if( grd_carempl.valueMatrix(i, grd_carempl.colRef("flagyn")) == "Y") {
  264. grd_carempl.addStatus(i, "update") ;
  265. }
  266. else {
  267. grd_carempl.removeStatus(i, "update") ;
  268. }
  269. }
  270. model.refresh();
  271. // model.setValue("/root/save",grd_carempl.getUpdateData() );
  272. misfSave("TXRWD01701");
  273. misfMsterDetailRetrieve();
  274. ]]>
  275. </script>
  276. </button>
  277. </group>
  278. </xhtml:body>
  279. </xhtml:html>