SMAAA01700_교직원봉사자신청및출결관리.xrw 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125
  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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cond>
  11. <fromdd/>
  12. <todd/>
  13. <attendflag/>
  14. <name/>
  15. <actdeptnm/>
  16. </cond>
  17. <empvoluntrattdabsn>
  18. <empvoluntrattdabsnlist>
  19. <img_st/>
  20. <chk/>
  21. <emplno/>
  22. <name/>
  23. <attdabsnyn/>
  24. <depthngnm/>
  25. <servdd/>
  26. <hosinhosoutflag/>
  27. <empactflag/>
  28. <actdeptnm/>
  29. <servtm/>
  30. <famyacompstcnt/>
  31. <gndr/>
  32. <cntctel/>
  33. <mpphonno/>
  34. <email/>
  35. <emplappseqno/>
  36. <dutplcedeptcd/>
  37. <rregno/>
  38. <residncaddr/>
  39. <currentyy/>
  40. <currentmm/>
  41. <currentdd/>
  42. <status/>
  43. <unitinstcd/>
  44. <unitcd/>
  45. <unitdeptnm/>
  46. <empactrem/>
  47. </empvoluntrattdabsnlist>
  48. <absndata/>
  49. <rex/>
  50. </empvoluntrattdabsn>
  51. <popupinfo>
  52. <param/>
  53. <flag/>
  54. <searchitem/>
  55. <list/>
  56. </popupinfo>
  57. <tempuserinfo/>
  58. <reportsql>
  59. <reportissseq>
  60. <issyy/>
  61. <issseqno/>
  62. </reportissseq>
  63. <servdata>
  64. <servddterm/>
  65. <servtmsum/>
  66. <emplnotmp/>
  67. </servdata>
  68. <voluntrhist>
  69. <voluntrhistinfo>
  70. <hisservdd/>
  71. <hosinhosoutflagnm/>
  72. <empactflagnm/>
  73. <hisservtm/>
  74. <hisactdeptnm/>
  75. </voluntrhistinfo>
  76. </voluntrhist>
  77. </reportsql>
  78. <aaa>
  79. <report>
  80. <systeminstnm/>
  81. <status/>
  82. <issrem/>
  83. <isscnts/>
  84. </report>
  85. <voluntrhist>
  86. <voluntrhistinfo>
  87. <hisservdd/>
  88. <hosinhosoutflagnm/>
  89. <empactflagnm/>
  90. <hisservtm/>
  91. <hisactdeptnm/>
  92. </voluntrhistinfo>
  93. </voluntrhist>
  94. </aaa>
  95. </main>
  96. <init>
  97. <hosinhosoutflag/>
  98. <gndr/>
  99. <empactflag/>
  100. </init>
  101. <send>
  102. <reqdata/>
  103. <savedata/>
  104. </send>
  105. <hidden/>
  106. <tmp>
  107. <empnoinfo>
  108. <empnoinfolist/>
  109. </empnoinfo>
  110. </tmp>
  111. <temp>
  112. <popmenu>
  113. <menu>
  114. <name>복사</name>
  115. <func>fEmpInfoRgstCopy</func>
  116. </menu>
  117. </popmenu>
  118. </temp>
  119. </root>
  120. </instance>
  121. <bind id="bind1" ref="/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist/servtm" readonly="../attdabsnyn != 'Y'"/>
  122. <script type="javascript" ev:event="xforms-ready">
  123. <![CDATA[
  124. // grd_studvoluntrlist.fixedcellcheckbox(0,1) = "true";
  125. fInit();
  126. ]]>
  127. </script>
  128. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  129. <submission id="TRAAA01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/empvoluntrattdabsn"/>
  130. <submission id="TXAAA01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root"/>
  131. <submission id="TRAAA01702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/tmp/empnoinfo"/>
  132. <submission id="TRAAA01703" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/reportsql"/>
  133. <submission id="TXAAA01702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root"/>
  134. </model>
  135. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  136. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  137. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  138. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  139. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  140. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  141. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  142. <script type="javascript">
  143. <![CDATA[
  144. //화면 오픈시 초기화
  145. function fInit() {
  146. //그리드 제어
  147. //grd_empvoluntrattdabsnlist.colDisabled(grd_empvoluntrattdabsnlist.colRef("servtm")) = true;
  148. //grd_empvoluntrattdabsnlist.valueMatrix(idxRow,grd_empvoluntrattdabsnlist.colRef("servtm"))="gkqrP";
  149. model.removeNodeset("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist");
  150. //날짜 초기화
  151. var Ndate = getNewDate();
  152. var Idate = Ndate.getDateFormat("YYYYMM")+"01";
  153. var sDate = getNewDate(); //달의 마지막날 가져오기
  154. var lastDate = sDate.getFullYear();
  155. lastDate = lastDate.toString() + (( sDate.getMonth() + 1 > 9 ) ? sDate.getMonth() + 1 : "0" + (sDate.getMonth() + 1));
  156. lastDate = lastDate.toString() + sDate.getMonthDay();
  157. grd_empvoluntrattdabsnlist.fixedcellcheckbox(0,2)=true; //체크박스 위에 전체 선택 하는 콤보 셋팅
  158. var systeminstnm = getUserInfo("systeminstnm"); //기관명
  159. model.setValue("/root/main/aaa/report/systeminstnm", systeminstnm+" 병원장");
  160. zbcfGetCodeList( new Array("A0509", "P0313","A0508"), new Array("/root/init/hosinhosoutflag", "/root/init/gndr","/root/init/empactflag"), true );
  161. model.setValue("/root/main/cond/fromdd", Idate);
  162. model.setValue("/root/main/cond/todd", lastDate);
  163. model.refresh();
  164. }
  165. //엑셀저장클릭시
  166. function fExcel() {
  167. if (grd_empvoluntrattdabsnlist.rows <= 1) {
  168. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  169. return;
  170. }
  171. var fileName = window.fileDialog("save", ",", false, "교직원봉사자 신청 리스트", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  172. if (fileName != ""){
  173. grd_empvoluntrattdabsnlist.saveExcel(fileName, "SheetName", false, false, "", "", false);
  174. }
  175. }//fExcel END
  176. //초기화버튼 클릭시
  177. function fReset(){
  178. var btn = messageBox("초기화를 ", "Q004");
  179. if (btn == '6') {
  180. model.removeNodeset("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist");
  181. model.resetInstanceNode("/root/main/cond");
  182. var Ndate = getNewDate();
  183. var Idate = Ndate.getDateFormat("YYYYMM")+"01";
  184. var sDate = getNewDate(); //달의 마지막날 가져오기
  185. var lastDate = sDate.getFullYear();
  186. lastDate = lastDate.toString() + (( sDate.getMonth() + 1 > 9 ) ? sDate.getMonth() + 1 : "0" + (sDate.getMonth() + 1));
  187. lastDate = lastDate.toString() + sDate.getMonthDay();
  188. model.setValue("/root/main/cond/fromdd", Idate);
  189. model.setValue("/root/main/cond/todd", lastDate);
  190. model.setValue("/root/main/cond/attendflag","0");
  191. model.setValue("/root/main/cond/name","");
  192. model.refresh();
  193. } else if (btn == '7') {
  194. return;
  195. }
  196. }//fReset END
  197. //행추가 버튼 클릭시
  198. function fInsRow(){
  199. //행추가버튼 클릭시 한줄만 추가 ----servdd변경------
  200. grd_empvoluntrattdabsnlist.addRow();
  201. var curRow = grd_empvoluntrattdabsnlist.row;
  202. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/servdd", getCurrentDate());
  203. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/hosinhosoutflag", "O");
  204. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/empactflag", "2");
  205. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/status", "i");
  206. grd_empvoluntrattdabsnlist.cellStyle("background-image", curRow, 1) = "../../../com/commonweb/images/icon_i.gif";//insert img
  207. // model.setValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+ row +"]/servdd",getCurrentDate());
  208. // grd_svcspec.colDisabled(grd_svcspec.colRef("voluntrnm")) = true;
  209. // grd_svcspec.colDisabled(grd_svcspec.colRef("actdeptcd")) = true;
  210. // grd_svcspec.colDisabled(grd_svcspec.colRef("actdeptdetlnm")) = true;
  211. // grd_svcspec.colDisabled(grd_svcspec.colRef("voluntractdwcd")) = true;
  212. // grd_svcspec.colDisabled(grd_svcspec.colRef("voluntractteamcd")) = true;
  213. // model.setValue("/root/main/svcspec/svcspeclist["+row+"]/actdeptcd", "-");
  214. // model.setValue("/root/main/svcspec/svcspeclist["+row+"]/voluntractdwcd", "-");
  215. // model.setValue("/root/main/svcspec/svcspeclist["+row+"]/voluntractteamcd", "-");
  216. model.refresh();
  217. }//fInsRow END
  218. //행삭제 버튼 클릭시
  219. function fDelRow() {
  220. var idxRow = grd_empvoluntrattdabsnlist.row;
  221. var rowstatus = model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+idxRow+"]/status");
  222. //alert(rowstatus);
  223. if(idxRow !='-1'&& idxRow !='0' )
  224. {
  225. if(rowstatus =='i')
  226. {
  227. grd_empvoluntrattdabsnlist.deleteRow(idxRow);// 클릭한 행이 공백일 때 행 삭제
  228. }
  229. else if(rowstatus =='d')
  230. {
  231. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+idxRow+"]/status","");
  232. grd_empvoluntrattdabsnlist.cellStyle("background-image", idxRow, 1) = "../../../com/commonweb/images/icon_n.gif";//e img
  233. }
  234. else
  235. {
  236. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+idxRow+"]/status","d");
  237. grd_empvoluntrattdabsnlist.cellStyle("background-image", idxRow, 1) = "../../../com/commonweb/images/icon_d.gif";//delete img
  238. }
  239. }
  240. else
  241. {
  242. messageBox("삭제할 행을", "C002");
  243. return;
  244. }
  245. // var idxRow = grd_empvoluntrattdabsnlist.row;
  246. // var rowstatus = grd_empvoluntrattdabsnlist.rowStatus(idxRow);
  247. // //alert(rowstatus);
  248. // if(idxRow>0)
  249. // {
  250. // if(rowstatus=='1'||rowstatus=='3')
  251. // {
  252. // grd_empvoluntrattdabsnlist.deleteRow(idxRow);// 클릭한 행이 공백일 때 행 삭제
  253. // }
  254. // else
  255. // {
  256. // if(rowstatus=='4'||rowstatus=='6') //상태가 delete또는 Update& Delete일 때
  257. // {
  258. // grd_empvoluntrattdabsnlist.removeStatus(idxRow,"delete"); //delete상태를 초기화 한다.
  259. // }
  260. // else
  261. // {
  262. // grd_empvoluntrattdabsnlist.removeStatus(idxRow,"insert");
  263. // grd_empvoluntrattdabsnlist.addStatus(idxRow,"delete");// 클릭한 행에 값이 있을 때에는 delete 로 상태 표시
  264. // }
  265. // }
  266. // }
  267. // else
  268. // {
  269. // messageBox("삭제할 행을", "C002");
  270. // return;
  271. // }
  272. // var idxRows = grd_empvoluntrattdabsnlist.rows;
  273. // if(idxRow>0 && model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+idxRow+"]/chk") !='1')
  274. // {
  275. // if(rowstatus=='1'||rowstatus=='3')
  276. // {
  277. // // 클릭한 행이 공백일 때 행 삭제
  278. // grd_empvoluntrattdabsnlist.deleteItem(idxRow);
  279. // }
  280. // else
  281. // {
  282. // if(rowstatus=='4'||rowstatus=='6') //상태가 delete또는 Update& Delete일 때
  283. // {
  284. // //alert("delete초기화");
  285. // grd_empvoluntrattdabsnlist.removeStatus(idxRow,"delete"); //delete상태를 초기화 한다.
  286. // }
  287. // else
  288. // {
  289. // // 클릭한 행에 값이 있을 때에는 delete 로 상태 표시
  290. // grd_empvoluntrattdabsnlist.removeStatus(idxRow,"insert");
  291. // grd_empvoluntrattdabsnlist.addStatus(idxRow,"delete");
  292. // }
  293. // }
  294. // }
  295. // else if(model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+idxRow+"]/chk") =='1')
  296. // {
  297. // for(i=1;i<idxRows;i++)
  298. // {
  299. // if(model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/chk") =='1')
  300. // {
  301. // var rowstatus2 = grd_empvoluntrattdabsnlist.rowStatus(i);
  302. // if(rowstatus2=='4'||rowstatus=='6') {
  303. // //alert("11111");
  304. // grd_empvoluntrattdabsnlist.removeStatus(i,"delete"); //delete상태를 초기화 한다.
  305. // } else {
  306. // //alert("22222");
  307. // grd_empvoluntrattdabsnlist.addStatus(i,"delete");//체크된 Row의 상태를 delete로 바꾼다.
  308. // }
  309. // }
  310. // }
  311. // }
  312. // else
  313. // {
  314. // messageBox("삭제할 행을", "C002");
  315. // return;
  316. // }
  317. model.refresh();
  318. }//fDelRow END
  319. //조회버튼 클릭시
  320. function fEmpVoluntrAttdAbsnList() {
  321. if (model.getValue("/root/main/cond/fromdd") == "" ) {
  322. messageBox("시작일자는 ","I003");
  323. model.setFocus("ipt_fromdd");
  324. return false;
  325. }
  326. if (model.getValue("/root/main/cond/fromdd").length != 8 ) {
  327. messageBox("올바른 시작일자 항목을","C001");
  328. model.setFocus("ipt_fromdd");
  329. return false;
  330. }
  331. if (model.getValue("/root/main/cond/todd") == "" ) {
  332. messageBox("종료일자는 ","I003");
  333. model.setFocus("ipt_todd");
  334. return false;
  335. }
  336. if (model.getValue("/root/main/cond/todd").length != 8 ) {
  337. messageBox("올바른 종료일자 항목을","C001");
  338. model.setFocus("ipt_todd");
  339. return false;
  340. }
  341. if (model.getValue("/root/main/cond/fromdd") > model.getValue("/root/main/cond/todd")) {
  342. messageBox("올바른 조회기간을","C001");
  343. model.setFocus("ipt_fromdd");
  344. return false;
  345. }
  346. model.removeNodeset("/root/send/reqdata");
  347. model.makeNode("/root/send/reqdata");
  348. model.copyNode("/root/send/reqdata", "/root/main/cond");
  349. submit("TRAAA01701");
  350. for(i=1;i<infoRows;i++)
  351. {
  352. model.removeNodeset("/root/main/reportsql/servdata["+i+"]/emplnotmp"); //조회된사번을 수정하지못하도록 하기위해서
  353. model.makeValue("/root/main/reportsql/servdata["+i+"]/emplnotmp", "/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/emplno");
  354. }
  355. var infoRows = grd_empvoluntrattdabsnlist.rows;
  356. for(i=1;i<infoRows;i++)
  357. {
  358. if(model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/status") =="")
  359. {
  360. model.makeNode("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/img_st");
  361. grd_empvoluntrattdabsnlist.cellStyle("background-image", i, 1) = "../../../com/commonweb/images/icon_n.gif";//insert img
  362. }
  363. }
  364. }
  365. //저장버튼클릭시.
  366. function fSaveData() {
  367. //alert(grd_empvoluntrattdabsnlist.getUpdateData());
  368. var idx = grd_empvoluntrattdabsnlist.row; //-1
  369. var idx2 = grd_empvoluntrattdabsnlist.rows; //2
  370. // alert(grd_empvoluntrattdabsnlist.rowStatus(idx));
  371. var cnt = 0;
  372. model.removenode("/root/send");
  373. model.makeNode("/root/send/savedata");
  374. for(i=1;i<idx2;i++)
  375. {
  376. if(model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/status") == "i"
  377. ||model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/status") == "u"
  378. || model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/status") == "d" )
  379. {
  380. cnt=cnt+1;
  381. if( cnt =="1")
  382. {
  383. copyNodesetType("/root/send/savedata", "/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]","replace");
  384. }
  385. else
  386. {
  387. copyNodesetType("/root/send/savedata", "/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]","after");
  388. }
  389. }
  390. }
  391. if(cnt == 0)
  392. {
  393. messageBox("저장할 자료가 ","I004");
  394. return;
  395. }
  396. //model.makeValue("/root/main/empvoluntrattdabsn/absndata", grd_empvoluntrattdabsnlist.getUpdateData());
  397. // var nodeList = instance1.selectNodes("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[status='i' or status='u' or status='d']") ;
  398. // var saveData = getNodeListCSV(nodeList);
  399. // alert(saveData);
  400. //
  401. //// model.makeValue("/root/main/empvoluntrattdabsn/absndata",
  402. //// getNodeListCSV(nodeList) );
  403. //
  404. // model.setValue("/root/send/savedata", saveData);
  405. if(submit("TXAAA01701")) {
  406. messageBox("자료 저장이 ","I002");
  407. }
  408. // if(grd_empvoluntrattdabsnlist.rowStatus(idx) == "0"){
  409. // messageBox("저장할 자료가 ","I004");
  410. // return;
  411. // }
  412. // if( idx > 0 ){
  413. // if(grd_empvoluntrattdabsnlist.rowStatus(idx) == "2" || grd_empvoluntrattdabsnlist.rowStatus(idx) == "3" || grd_empvoluntrattdabsnlist.rowStatus(idx) == "4"){
  414. // model.removenode("/root/send");
  415. // model.makeNode("/root/send/savedata");
  416. // model.makeValue("/root/main/empvoluntrattdabsn/absndata", grd_empvoluntrattdabsnlist.getUpdateData());
  417. // model.copyNode("/root/send/savedata", "/root/main/empvoluntrattdabsn");
  418. //
  419. // if(submit("TXAAA01701")) {
  420. // messageBox("자료 저장이 ","I002");
  421. // }
  422. // grd_empvoluntrattdabsnlist.clearStatus();
  423. //
  424. // }
  425. // }
  426. }
  427. //그리드에서 필수항목 체크
  428. function fCheckMandatoryInput() {
  429. for (var i = 1; i < (grd_empvoluntrattdabsnlist.rows); i++) {
  430. if (model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+ i +"]/emplno") == "" ) {
  431. messageBox("사번은","I003");
  432. return false;
  433. }
  434. }
  435. for (var i = 1; i < (grd_empvoluntrattdabsnlist.rows); i++) {
  436. if (model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+ i +"]/hosinhosoutflag") == "" ) {
  437. messageBox("미입력된 봉사구분 항목을 입력하십시오.","I");
  438. return false;
  439. }
  440. }
  441. for (var i = 1; i < (grd_empvoluntrattdabsnlist.rows); i++) {
  442. if (model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+ i +"]/empactflag") == "" ) {
  443. messageBox("미입력된 봉사구분 항목을 입력하십시오.","I");
  444. return false;
  445. }
  446. }
  447. for (var i = 1; i < (grd_empvoluntrattdabsnlist.rows); i++) {
  448. if (model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+ i +"]/attdabsnyn") == "Y") {
  449. if (model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+ i +"]/servtm") == "" ) {
  450. messageBox("미입력된 활동시간 항목을 입력하십시오.","I");
  451. return false;
  452. }
  453. }
  454. }
  455. return true;
  456. }//fCheckMandatoryInput END
  457. // 교직원 등록시 행의 내용 복사하는 함수-20090622-kys
  458. function fEmpInfoRgstCopy()
  459. {
  460. var sRows=grd_empvoluntrattdabsnlist.selectedRows; // 블럭 잡은 데이터 갯수
  461. var eRow=grd_empvoluntrattdabsnlist.selectedRow(0); // 블럭 잡은 첫째 행
  462. for(i=0;i<sRows;i++)
  463. {
  464. // 블럭 처리된 갯수 만큼 선택된 행의 인덱스를 구해, 첫번째 인덱스의 값을 복사한다.
  465. var tRow=grd_empvoluntrattdabsnlist.selectedRow(i);
  466. var rowstatus=model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+tRow+"]/status");
  467. //alert("rowstatus : " + rowstatus);
  468. // 행의 상태가 delete 또는 delete& update가 아닐때만 선택 행을 복사한다.
  469. if(rowstatus!="d")
  470. {
  471. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + tRow + "]/attdabsnyn", model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + eRow + "]/attdabsnyn"));
  472. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + tRow + "]/servdd", model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + eRow + "]/servdd"));
  473. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + tRow + "]/hosinhosoutflag", model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + eRow + "]/hosinhosoutflag"));
  474. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + tRow + "]/empactflag", model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + eRow + "]/empactflag"));
  475. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + tRow + "]/actdeptnm", model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + eRow + "]/actdeptnm"));
  476. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + tRow + "]/servtm", model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + eRow + "]/servtm"));
  477. if(rowstatus == "i"){
  478. //grd_empvoluntrattdabsnlist.addStatus(tRow,"insert");
  479. //model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+eRow+"]/status","i");
  480. }else{
  481. //grd_empvoluntrattdabsnlist.addStatus(tRow,"update");
  482. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+tRow+"]/status","u");
  483. grd_empvoluntrattdabsnlist.cellStyle("background-image", tRow, 1) = "../../../com/commonweb/images/icon_u.gif";//update img
  484. } // 선택된 행의 상태값을 update로 처리
  485. }
  486. }
  487. model.refresh();
  488. }
  489. ]]>
  490. </script>
  491. </xhtml:head>
  492. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  493. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  494. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:194px; height:14px; ">교직원봉사자신청 및 출결관리</caption>
  495. </group>
  496. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  497. <line id="line12" class="line_1" style="x1:0px; y1:77px; x2:1194px; y2:77px; "/>
  498. <caption id="caption32" class="tit_2" style="left:5px; top:62px; width:219px; height:14px; ">교직원봉사자 신청 및 신청 리스트</caption>
  499. <group id="group1" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  500. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; ">d</shape>
  501. <button id="button6" class="btn1_letter2" style="left:1122px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  502. <caption>조회</caption>
  503. <script type="javascript" ev:event="DOMActivate">
  504. <![CDATA[
  505. fEmpVoluntrAttdAbsnList();
  506. ]]>
  507. </script>
  508. </button>
  509. <caption id="cap_fromdd" class="search_name" style="left:15px; top:9px; width:100px; height:17px; ">봉사일자 :</caption>
  510. <caption id="cap_svcflag" class="search_name" style="left:640px; top:10px; width:100px; height:17px; ">교직원명 :</caption>
  511. <input id="inp_name" ref="/root/main/cond/name" class="input_search" appearance="minimal" style="left:735px; top:10px; width:90px; height:19px; "/>
  512. <input id="ipt_fromdd" ref="/root/main/cond/fromdd" class="input_search" inputtype="date" style="left:109px; top:9px; width:90px; height:19px; "/>
  513. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  514. <caption id="cap_middle" style="left:209px; top:9px; width:16px; height:19px; ">~</caption>
  515. <input id="ipt_todd" ref="/root/main/cond/todd" class="input_search" inputtype="date" style="left:231px; top:9px; width:90px; height:19px; "/>
  516. <caption id="cap_vacflag" class="search_name" style="left:410px; top:10px; width:80px; height:17px; ">출석자 :</caption>
  517. <select id="checkbox2" ref="/root/main/cond/attendflag" overflow="visible" appearance="full" style="left:490px; top:10px; width:100px; height:20px; border-style:none; ">
  518. <choices>
  519. <item>
  520. <label/>
  521. <value>Y</value>
  522. </item>
  523. </choices>
  524. </select>
  525. <caption id="capactflag" class="search_name" style="left:850px; top:10px; width:145px; height:17px; ">봉사장소/활동부서 :</caption>
  526. <input id="ipt_actdeptnm" ref="/root/main/cond/actdeptnm" class="input_search" appearance="minimal" style="left:1005px; top:10px; width:90px; height:19px; "/>
  527. </group>
  528. <datagrid id="grd_empvoluntrattdabsnlist" nodeset="/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist" visibility="visible" autoresize="true" caption="^^사번^성명^주민번호^출석여부^소속부서^근무부서^봉사일자^봉사구분^봉사구분^봉사장소/활동부서^활동시간^가족동반수^성별^원내번호^핸드폰^e-mail^emplappseqno^caption1^caption2^caption3^caption5^caption6^servtmterm^^^비고" colsep="^" colwidth="19, 20, 90, 90, 100, 55, 100, 100, 100, 55, 95, 125, 70, 70, 70, 110, 110, 170, 100, 100, 100, 100, 100, 100, 100, 100, 100, 170" dataheight="25" explorerbar="sort" frozencols="4" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:1px; top:80px; width:1194px; height:659px; text-align:center; ">
  529. <col ref="img_st" style="text-align:center; "/>
  530. <col checkvalue="1,0" ref="chk" type="checkbox"/>
  531. <col disabled="true" ref="emplno" type="inputbutton" style="text-align:left; "/>
  532. <col ref="name" style="text-align:center; "/>
  533. <col ref="rregno" style="text-align:center; "/>
  534. <col checkvalue="Y,N" ref="attdabsnyn" type="checkbox"/>
  535. <col ref="unitdeptnm" style="text-align:center; "/>
  536. <col ref="depthngnm" style="text-align:center; "/>
  537. <col ref="servdd" type="inputdate" style="text-align:center; "/>
  538. <col ref="hosinhosoutflag" type="combo" style="text-align:left; ">
  539. <choices>
  540. <itemset nodeset="/root/init/hosinhosoutflag/A0509">
  541. <label ref="cdnm"/>
  542. <value ref="cdid"/>
  543. </itemset>
  544. </choices>
  545. </col>
  546. <col ref="empactflag" type="combo" style="text-align:left; ">
  547. <choices>
  548. <itemset nodeset="/root/init/empactflag/A0508">
  549. <label ref="cdnm"/>
  550. <value ref="cdid"/>
  551. </itemset>
  552. </choices>
  553. </col>
  554. <col ref="actdeptnm" type="input" maxlength="100" style="text-align:left; "/>
  555. <col ref="servtm" type="input" format="#.9" maxlength="4" style="text-align:center; "/>
  556. <col ref="famyacompstcnt" type="input" maxlength="2"/>
  557. <col disabled="true" ref="gndr" type="combo" style="text-align:center; ">
  558. <choices>
  559. <itemset nodeset="/root/init/gndr/P0313">
  560. <label ref="cdnm"/>
  561. <value ref="cdid"/>
  562. </itemset>
  563. </choices>
  564. </col>
  565. <col ref="cntctel" style="text-align:left; "/>
  566. <col ref="mpphonno" style="text-align:left; "/>
  567. <col ref="email" style="text-align:left; "/>
  568. <col ref="emplappseqno" visibility="hidden"/>
  569. <col ref="dutplcedeptcd" visibility="hidden"/>
  570. <col ref="unitinstcd" visibility="hidden"/>
  571. <col ref="unitcd" visibility="hidden"/>
  572. <!--<col ref="rregno" visibility="hidden"/> 이동-20090930-kys-->
  573. <col ref="residncaddr" visibility="hidden"/>
  574. <col ref="currentyy" visibility="hidden"/>
  575. <col ref="currentmm" visibility="hidden"/>
  576. <col ref="currentdd" visibility="hidden"/>
  577. <col ref="status" visibility="hidden"/>
  578. <col ref="empactrem" type="input" maxlength="100" style="text-align:left; "/>
  579. <script type="javascript" ev:event="onbuttonclick">
  580. <![CDATA[
  581. var idxRow = grd_empvoluntrattdabsnlist.row;
  582. if(grd_empvoluntrattdabsnlist.colRef("emplno") == grd_empvoluntrattdabsnlist.col){
  583. //if(grd_attntrlist.col == 5 && model.getValue('/root/main/attntrlist/attntrlistinfo[' + grd_attntrlist.row + ']/status') == 'i'){
  584. if(grd_empvoluntrattdabsnlist.rowStatus(idxRow) == "1" || grd_empvoluntrattdabsnlist.rowStatus(idxRow) == "3"){
  585. fPopupInfo();
  586. }
  587. }
  588. //팝업아이콘 클릭하여 교직원 조회
  589. function fPopupInfo(){
  590. var emplno = "";
  591. var name = "";
  592. var cntctel = "";
  593. var mpphonno = "";
  594. var email = "";
  595. var gndr = "";
  596. var deptcd = "";
  597. var deptnm = "";
  598. var unitinstcd = "";
  599. var unitcd = "";
  600. var unitdeptnm = "";
  601. var nodeList = null;
  602. model.removenodeset("/root/main/popupinfo");
  603. model.makeNode("/root/main/popupinfo");
  604. model.makeValue("/root/main/popupinfo/param", '_OneS_DD');
  605. modal("../../userdeptinfoweb/xrw/SPZSU10103_사용자부서선택조회", "", "200", "200", "SPZSU10103")
  606. var iParam = getParameter('SPZSU10103_');
  607. clearParameter('SPZSU10103_');
  608. if(iParam != ''){
  609. setCSVToNode("/root/main/popupinfo", iParam);
  610. model.removenode("/root/send");
  611. model.makeNode("/root/send/reqdata");
  612. model.copyNode("/root/send/reqdata", "/root/main/popupinfo");
  613. //var instcd = getUserInfo("posinstcd");
  614. // 타기관 교직원도 등록 가능하도록 변경요청 2009.06.16 hhm
  615. // var instcd = getUserInfo("dutplceinstcd");
  616. // if(model.getValue("/root/main/popupinfo/list/dutplceinstcd") != instcd)
  617. // {
  618. // messageBox("기관코드가 다른교직원입니다.","I");
  619. // return;
  620. // }
  621. submit("TRAAA01702");
  622. var idxRow = grd_empvoluntrattdabsnlist.row;
  623. var nodecnt = getNodesetCount("/root/tmp/empnoinfo/empnoinfolist");
  624. if ( nodecnt > 0){
  625. grd_empvoluntrattdabsnlist.deleteItem(grd_empvoluntrattdabsnlist.row);
  626. //grd_empvoluntrattdabsnlist.rebuild();
  627. for( var i = 1 ; i <= nodecnt ; i++ ){
  628. emplno = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/emplno");
  629. name = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/name");
  630. cntctel = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/cntctel");
  631. mpphonno = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/mpphonno");
  632. email = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/email");
  633. gndr = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/gndr");
  634. deptcd = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/dutplcedeptcd");
  635. deptnm = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/depthngnm");
  636. unitinstcd = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/unitinstcd");
  637. unitcd = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/unitcd");
  638. unitdeptnm = model.getValue("/root/tmp/empnoinfo/empnoinfolist[" + i +"]/unitdeptnm");
  639. //alert(emplno);
  640. //사번중복체크
  641. /*
  642. nodeList = instance1.selectNodes("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[emplno = '"+ emplno +"']/emplno");
  643. alert(nodeList.length);
  644. if( nodeList != null && nodeList.length > 0){
  645. messageBox("저장되어 있는 사번","E008");
  646. continue;
  647. }
  648. */
  649. grd_empvoluntrattdabsnlist.addItem();//행추가
  650. //curRow = curRow + 1;
  651. var curRow = grd_empvoluntrattdabsnlist.row;
  652. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/servdd", getCurrentDate());
  653. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/emplno", emplno);
  654. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/name", name);
  655. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/cntctel", cntctel);
  656. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/mpphonno", mpphonno);
  657. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/email", email);
  658. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/gndr", gndr);
  659. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/dutplcedeptcd", deptcd);
  660. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/depthngnm", deptnm);
  661. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/hosinhosoutflag","O");
  662. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/empactflag","2");
  663. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/unitinstcd",unitinstcd);
  664. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/unitcd",unitcd);
  665. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/unitdeptnm",unitdeptnm);
  666. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/status","i");
  667. grd_empvoluntrattdabsnlist.cellStyle("background-image", curRow, 1) = "../../../com/commonweb/images/icon_i.gif";//insert img
  668. }
  669. model.removenode("/root/tmp");
  670. model.makeNode("/root/tmp");
  671. }
  672. }else{
  673. //messageBox("사번이 선택되지","E007");
  674. messageBox("사번 정보가","I004");
  675. return;
  676. }
  677. }//fPopupInfo END
  678. ]]>
  679. </script>
  680. <script type="javascript" ev:event="onendedit">
  681. <![CDATA[
  682. var idxRow = grd_empvoluntrattdabsnlist.row;
  683. if(grd_empvoluntrattdabsnlist.colRef("emplno") == grd_empvoluntrattdabsnlist.col){
  684. //if(grd_attntrlist.col == 5 && model.getValue('/root/main/attntrlist/attntrlistinfo[' + grd_attntrlist.row + ']/status') == 'i'){
  685. if(grd_empvoluntrattdabsnlist.rowStatus(idxRow) == "1" || grd_empvoluntrattdabsnlist.rowStatus(idxRow) == "3")
  686. {
  687. fPopupInfo();
  688. }
  689. else
  690. {
  691. model.setValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+idxRow+"]/emplno", model.getValue("/root/main/reportsql/servdata["+idxRow+"]/emplnotmp"));
  692. }
  693. }
  694. function fPopupInfo() {
  695. var row = grd_empvoluntrattdabsnlist.row;
  696. model.removenode("/root/send");
  697. model.makeNode("/root/send/reqdata");
  698. model.makeValue("/root/send/reqdata/userid", model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+row+"]/emplno"));
  699. //alert(model.getValue("/root/send/reqdata"));
  700. submit("TRAAA01702"); //없는 data를 조회시 에러
  701. if(model.getValue("/root/tmp/empnoinfo/empnoinfolist/emplno") !='') {
  702. emplno = model.getValue("/root/tmp/empnoinfo/empnoinfolist/emplno");
  703. name = model.getValue("/root/tmp/empnoinfo/empnoinfolist/name");
  704. cntctel = model.getValue("/root/tmp/empnoinfo/empnoinfolist/cntctel");
  705. mpphonno = model.getValue("/root/tmp/empnoinfo/empnoinfolist/mpphonno");
  706. email = model.getValue("/root/tmp/empnoinfo/empnoinfolist/email");
  707. gndr = model.getValue("/root/tmp/empnoinfo/empnoinfolist/gndr");
  708. deptcd = model.getValue("/root/tmp/empnoinfo/empnoinfolist/dutplcedeptcd");
  709. deptnm = model.getValue("/root/tmp/empnoinfo/empnoinfolist/depthngnm");
  710. unitinstcd = model.getValue("/root/tmp/empnoinfo/empnoinfolist/unitinstcd");
  711. unitcd = model.getValue("/root/tmp/empnoinfo/empnoinfolist/unitcd");
  712. unitdeptnm = model.getValue("/root/tmp/empnoinfo/empnoinfolist/unitdeptnm");
  713. // alert(emplno);
  714. nodeList = instance1.selectNodes("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[emplno = '"+ emplno +"']/emplno");
  715. // alert(nodeList.length);
  716. //curRow = curRow + 1;
  717. var curRow = grd_empvoluntrattdabsnlist.row;
  718. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/emplno", emplno);
  719. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/name", name);
  720. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/cntctel", cntctel);
  721. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/mpphonno", mpphonno);
  722. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/email", email);
  723. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/gndr", gndr);
  724. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/dutplcedeptcd", deptcd);
  725. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/depthngnm", deptnm);
  726. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/unitinstcd", unitinstcd);
  727. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/unitcd", unitcd);
  728. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/unitdeptnm", unitdeptnm);
  729. model.removenode("/root/tmp");
  730. model.makeNode("/root/tmp");
  731. }else{
  732. //messageBox("사번이 선택되지","E007");
  733. var curRow = grd_empvoluntrattdabsnlist.row;
  734. messageBox("사번 정보가","I004");
  735. model.setValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + curRow + "]/emplno","");
  736. return;
  737. }
  738. }
  739. ]]>
  740. </script>
  741. <script type="javascript" ev:event="xforms-value-changed">
  742. <![CDATA[
  743. var idxRow = grd_empvoluntrattdabsnlist.row;
  744. if(grd_empvoluntrattdabsnlist.colRef("chk") != grd_empvoluntrattdabsnlist.col
  745. &&grd_empvoluntrattdabsnlist.colRef("emplno") != grd_empvoluntrattdabsnlist.col)
  746. {
  747. if(model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + idxRow + "]/status") != "i")
  748. {
  749. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+idxRow+"]/status","u");
  750. grd_empvoluntrattdabsnlist.cellStyle("background-image", idxRow, 1) = "../../../com/commonweb/images/icon_u.gif";//update img
  751. }
  752. }
  753. if(model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + idxRow + "]/attdabsnyn") != "Y")
  754. {
  755. model.setValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist[" + idxRow + "]/servtm", "");
  756. //활동시간.disabled = true;
  757. }
  758. else
  759. {
  760. //활동시간.disabled = false;
  761. }
  762. model.refresh();
  763. ]]>
  764. </script>
  765. <script type="javascript" ev:event="onmousedown">
  766. <![CDATA[
  767. //alert("grd_empvoluntrattdabsnlist.row : " + grd_empvoluntrattdabsnlist.row);
  768. //alert("grd_empvoluntrattdabsnlist.selectedRow(0) : " + grd_empvoluntrattdabsnlist.selectedRow(0));
  769. //alert("grd_empvoluntrattdabsnlist.selectedRows : " + grd_empvoluntrattdabsnlist.selectedRows);
  770. //alert("grd_empvoluntrattdabsnlist.rows : " + grd_empvoluntrattdabsnlist.rows);
  771. if(grd_empvoluntrattdabsnlist.isCell(event.target) && grd_empvoluntrattdabsnlist.mouseRow>=grd_empvoluntrattdabsnlist.fixedRows)
  772. {
  773. if(event.button==3)
  774. {
  775. window.setPopupMenu(true,"/root/temp/popmenu/menu","name","func",false);
  776. }
  777. else
  778. {
  779. window.setPopupMenu(false);
  780. }
  781. }
  782. else
  783. {
  784. window.setPopupMenu(false);
  785. return;
  786. }
  787. ]]>
  788. </script>
  789. </datagrid>
  790. <button id="button11" class="btn2_letter3" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:1009px; top:55px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn2_letter3.gif; ">
  791. <caption>행추가</caption>
  792. <script type="javascript" ev:event="DOMActivate">
  793. <![CDATA[
  794. fInsRow();
  795. ]]>
  796. </script>
  797. </button>
  798. <button id="button3" class="btn2_letter3" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:1067px; top:55px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn2_letter3.gif; ">
  799. <caption>행삭제</caption>
  800. <script type="javascript" ev:event="DOMActivate">
  801. <![CDATA[
  802. fDelRow();
  803. ]]>
  804. </script>
  805. </button>
  806. <button id="button1" class="btn2_letter4" disable.background-image="../../../com/commonweb/images/dis_btn2_letter4.gif" style="left:1124px; top:55px; width:64px; height:19px; background-image:../../../com/commonweb/images/btn2_letter4.gif; ">
  807. <caption>엑셀저장</caption>
  808. <script type="javascript" ev:event="DOMActivate">
  809. <![CDATA[
  810. fExcel();
  811. ]]>
  812. </script>
  813. </button>
  814. </group>
  815. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  816. <button id="button17" class="btn4_letter2" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:1067px; top:3px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
  817. <caption>저장</caption>
  818. <script type="javascript" ev:event="DOMActivate">
  819. <![CDATA[
  820. if ( !fCheckMandatoryInput() ) return; //그리드필수입력
  821. fSaveData();
  822. fEmpVoluntrAttdAbsnList(); //조회
  823. ]]>
  824. </script>
  825. </button>
  826. <button id="button10" class="btn4_letter3" disable.background-image="../../../com/commonweb/images/dis_btn4_letter3.gif" style="left:1126px; top:3px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  827. <caption>초기화</caption>
  828. <script type="javascript" ev:event="DOMActivate">
  829. <![CDATA[
  830. fReset();
  831. fEmpVoluntrAttdAbsnList(); //조회
  832. ]]>
  833. </script>
  834. </button>
  835. <line id="line16" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  836. <button id="button89" class="btn6_letter5" disable.background-image="../../../com/commonweb/images/dis_btn6_letter5.gif" style="left:0px; top:3px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn6_letter5.gif; ">
  837. <caption>확인서출력</caption>
  838. <script type="javascript" ev:event="DOMActivate">
  839. <![CDATA[
  840. fPreview();
  841. function fPreview(){
  842. var idxRow = grd_empvoluntrattdabsnlist.row; //변경된 data count [NO -1]
  843. var idxRows = grd_empvoluntrattdabsnlist.rows; //그리드 행 count
  844. var chkCount = 0; //체크된 data가 없을때 메세지처리
  845. //alert(idxRow);
  846. //alert(idxRows);
  847. for(i=1; i<idxRows; i++) {
  848. var chkFlag = model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/chk");
  849. if(chkFlag =='1')
  850. {
  851. model.makeNode("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist");
  852. model.copyNode("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist"
  853. , "/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]");
  854. chkCount = chkCount +1;
  855. }
  856. }
  857. if(chkCount=='0') {
  858. messageBox("확인서를 출력할 자원봉사자를 선택하십시오.","I");
  859. return;
  860. }
  861. if(chkCount>'1') {
  862. messageBox("확인서를 출력할 자원봉사자를 한명만 선택하십시오.","I");
  863. return;
  864. }
  865. model.removeNodeset("/root/send/reqdata");
  866. model.makeValue("/root/send/reqdata/voluntrflag",'3');
  867. model.makeValue("/root/send/reqdata/emplno", model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/emplno"));
  868. model.makeValue("/root/send/reqdata/attdabsnyn", model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/attdabsnyn"));
  869. if(model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/attdabsnyn") == "" )
  870. {
  871. messageBox("봉사자의 봉사활동정보가 없습니다.","I");
  872. return;
  873. }
  874. //submit("TRAAA01703"); //발행번호 조회하는 서브미션 [issseqno, issyy]
  875. setParameter("reportprintyn", ""); //출력 여부 알려주는 reportprintyn 란 파라메터 셋팅
  876. setParameter("SMAAA01700_Param", "Y"); //교직원봉사자신청화면에서의 Open 파라메터 셋팅-20091005-kys
  877. modal("SPAAA02200", "1","150", "150", "SPAAA02200"); //확인서의 내용과 비고값을 입력받는다.
  878. if(model.getValue("/root/main/aaa/report/status")!="i")
  879. {
  880. model.removeNodeset("/root/main/aaa/report/issrem");
  881. model.removeNodeset("/root/main/aaa/report/isscnts");
  882. }
  883. else
  884. {
  885. //확인창에서 일자 선택후 이력을 가져와야 하므로 서브미션 이동함-20091005-kys
  886. submit("TRAAA01703"); //발행번호 조회하는 서브미션 [issseqno, issyy]
  887. //확인서를 출력하기위한 데이터를 /root/main/aaa/report 에 다 넣는다.
  888. model.makeValue("/root/main/aaa/report/voluntrflagnm","교직원");
  889. //model.makeValue("/root/main/aaa/report/stampflagnm","");
  890. model.makeValue("/root/main/aaa/report/voluntrnm",model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/name"));
  891. model.makeValue("/root/main/aaa/report/rrgstno",model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/rregno"));
  892. model.makeValue("/root/main/aaa/report/hometel",model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/cntctel"));
  893. model.makeValue("/root/main/aaa/report/mpphontel",model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/mpphonno"));
  894. model.makeValue("/root/main/aaa/report/servtm",model.getValue("/root/main/reportsql/servdata/servtmsum"));
  895. model.makeValue("/root/main/aaa/report/entrydd",model.getValue("/root/main/reportsql/servdata/servddterm"));
  896. model.makeValue("/root/main/aaa/report/issyy",model.getValue("/root/main/reportsql/reportissseq/issyy"));
  897. model.makeValue("/root/main/aaa/report/issseqno",model.getValue("/root/main/reportsql/reportissseq/issseqno"));
  898. model.makeValue("/root/main/aaa/report/currentyy",model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/currentyy"));
  899. model.makeValue("/root/main/aaa/report/currentmm",model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/currentmm"));
  900. model.makeValue("/root/main/aaa/report/currentdd",model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/currentdd"));
  901. model.makeValue("/root/main/aaa/report/detladdr",model.getValue("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist/residncaddr"));
  902. //20091005-kys-봉사이력추가
  903. model.copyNode("/root/main/aaa/voluntrhist"
  904. , "/root/main/reportsql/voluntrhist");
  905. //20091005-kys-확인서 변경으로 수정
  906. exeReportPreview("RPAAA01701", "XMLSTR");
  907. //exeReportPreview("RPAAA00101", "XMLSTR","/root/hidden/empvoluntrattdabsn");
  908. if (getParameter("reportprintyn") == "Y")
  909. { // 프린트 출력이 되고 창이 닫혔을 때
  910. fInsIssSeqNo();
  911. }
  912. model.removenode("/root/hidden/empvoluntrattdabsn");
  913. model.makeNode("/root/hidden/empvoluntrattdabsn");
  914. }
  915. model.removeNodeset("/root/main/aaa/report/status");
  916. model.refresh();
  917. }
  918. function fInsIssSeqNo()
  919. {
  920. // 발행번호 등록
  921. model.makeValue("/root/issseq/voluntrflag",3);
  922. // 봉사자 구분 3 :교직원 봉사자로 저장
  923. model.makeValue("/root/issseq/voluntrid",model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist/emplno"));
  924. model.makeValue("/root/issseq/issrem",model.getValue("/root/main/aaa/report/issrem"));
  925. model.makeValue("/root/issseq/isscnts",model.getValue("/root/main/aaa/report/isscnts"));
  926. // 해당 봉사자ID 값 저장
  927. model.removeNodeset("/root/send/savedata");
  928. model.makeNode("/root/send/savedata");
  929. model.copyNode("/root/send/savedata","/root/issseq");
  930. submit("TXAAA01702");
  931. model.refresh();
  932. }
  933. /* +
  934. var idxRow = grd_empvoluntrattdabsnlist.rows;
  935. var nodeCnt = 0; //chk된 data만 따로 저장
  936. var chkCount = 0;//chk된 data가 없을시 메세지 처리
  937. var idxRow = grd_empvoluntrattdabsnlist.row;
  938. alert(idxRow);
  939. if(idxRow =='-1' || idxRow=='0') {
  940. messageBox("봉사자를 선택하십시오","I");
  941. return;
  942. }
  943. model.makeNode("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist");
  944. model.copyNode("/root/hidden/empvoluntrattdabsn/empvoluntrattdabsnlist"
  945. , "/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+idxRow+"]");
  946. model.makeValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+idxRow+"]/voluntrflagnm", "교직원");
  947. model.removeNodeset("/root/send/reqdata");
  948. model.makeValue("/root/send/reqdata/voluntrflag",'3');
  949. submit("TRAAA01703"); //발행번호 조회하는 서브미션 [issseqno, issyy]
  950. setParameter("reportprintyn", ""); //출력 여부 알려주는 reportprintyn 란 파라메터 셋팅
  951. exeReportPreview("RPAAA00101", "XMLSTR", "/root/hidden/empvoluntrattdabsn", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
  952. if (getParameter("reportprintyn") == "Y")
  953. { // 프린트 출력이 되고 창이 닫혔을 때
  954. fInsIssSeqNo();
  955. // 발행번호 등록
  956. }
  957. model.refresh();
  958. }
  959. function fInsIssSeqNo() {
  960. // 발행번호 등록
  961. model.makeValue("/root/issseq/voluntrflag",3);
  962. // 봉사자 구분 3 :교직원 봉사자로 저장
  963. model.makeValue("/root/issseq/voluntrid",model.getValue("/root/main/studvoluntrinfo/voluntrinfo/voluntrid"));
  964. // 해당 봉사자ID 값 저장
  965. model.removeNodeset("/root/send/savedata");
  966. model.makeNode("/root/send/savedata");
  967. model.copyNode("/root/send/savedata","/root/issseq");
  968. submit("TXAAA01702")
  969. model.refresh();
  970. }
  971. */
  972. ]]>
  973. </script>
  974. </button>
  975. <button id="button4" class="btn3_letter4" style="left:97px; top:3px; width:80px; height:22px; ">
  976. <caption>SMS전송</caption>
  977. <script type="javascript" ev:event="onclick">
  978. <![CDATA[
  979. model.removeNodeset("/root/hidden/voluntrspec");
  980. var idxRow = grd_empvoluntrattdabsnlist.rows;
  981. var idxRows = grd_empvoluntrattdabsnlist.fixedRows;
  982. var chkCount=0;
  983. for(i=1;i<=idxRow-idxRows;i++) // 그리드에 체크된 개수만큼 for문 돌려서 값을 체크한다.
  984. {
  985. var chkFlag=model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/chk");
  986. if(chkFlag=='1')
  987. {
  988. var NodeCnt=eval(getNodesetCount("/root/hidden/voluntrspec/voluntrspecinfo"))+1;
  989. // 비어있는 hidden노드에 1을 더해 count개수 1를 만든다.
  990. model.makeNode("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]");
  991. //hidden노드에 첫번째 행을 만든뒤, 체크된 자원봉사자 정보 hidden에 넘겨준다.
  992. model.makeValue("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]/chk",model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/chk"));
  993. model.makeValue("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]/pid",model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/emplno"));
  994. model.makeValue("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]/recvrnm",model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/name"));
  995. model.makeValue("/root/hidden/voluntrspec/voluntrspecinfo["+NodeCnt+"]/recvrtelno",model.getValue("/root/main/empvoluntrattdabsn/empvoluntrattdabsnlist["+i+"]/mpphonno"));
  996. // 체크가 된 봉사자 갯수만큼 해당 값 복사해서 넘긴다.
  997. chkCount=chkCount+1;
  998. }
  999. }
  1000. if(chkCount=='0')
  1001. {
  1002. messageBox("SMS를 전송할 자원봉사자를 선택하십시오.","I");
  1003. return;
  1004. }
  1005. modal("SPAAA03400", "1","150", "150", "SPAAA03400", "/root/hidden/voluntrspec", " /root/main/recvrlist");
  1006. // /root/hidden/voluntrspec 경로에 담긴 정보 팝업창의 /root/main/sendmsg 노드로 보냄
  1007. // model.removeNodeset("/root/hidden/voluntrspec");
  1008. // model.makeNode("/root/hidden/voluntrspec");
  1009. model.refresh();
  1010. ]]>
  1011. </script>
  1012. </button>
  1013. <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  1014. </group>
  1015. </xhtml:body>
  1016. </xhtml:html>