SPAYA03300_교리출결자관리.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  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. <send>
  10. <reqdata>
  11. <doctrinecd/>
  12. <attdfromdd/>
  13. <attdtodd/>
  14. <doctrinetrgtmanposcd/>
  15. <trgtmannm/>
  16. <lactrnm/>
  17. </reqdata>
  18. <savedata/>
  19. <conslrpastor/>
  20. </send>
  21. <main>
  22. <doatinfo>
  23. <doatlist>
  24. <chk/>
  25. <doctrinetrgtmanposnm/>
  26. <trgtmannm/>
  27. <attdncdd/>
  28. <brthdatedd/>
  29. <lactrnm/>
  30. <lactrid/>
  31. <outerlactryn/>
  32. <doctrineprogrs/>
  33. <trgtmanid/>
  34. <rgstdd/>
  35. <seqno/>
  36. <status/>
  37. </doatlist>
  38. </doatinfo>
  39. </main>
  40. <init>
  41. <cmblist>
  42. <doctrineinfo/>
  43. <doctrinetrgtmanposinfo/>
  44. </cmblist>
  45. </init>
  46. <hidden>
  47. <errmsg/>
  48. <conslrpastor/>
  49. </hidden>
  50. </root>
  51. </instance>
  52. <script type="javascript" ev:event="xforms-ready">
  53. <![CDATA[
  54. fInit();
  55. ]]>
  56. </script>
  57. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  58. <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  59. <submission id="TRAYA03301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/doatinfo"/>
  60. <submission id="TXAYA03301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root"/>
  61. <submission id="TRAYA01303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/conslrpastor" resultref="/root/hidden/conslrpastor"/>
  62. </model>
  63. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  64. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  67. <script type="javascript">
  68. <![CDATA[
  69. // 초기값 셋팅
  70. function fInit()
  71. {
  72. //출석 저장 체크박스 설정
  73. grd_list.fixedcellcheckbox(0,1) = true;
  74. //조회조건 콤보리스트 셋팅(교리명, 대상자소속, 상태구분)
  75. zbcfGetCodeList(new Array("A0211"), new Array("/root/init/cmblist/doctrineinfo"), true);
  76. //조회부 콤보 셋팅(상태구분)
  77. zbcfGetKindCodeList(
  78. new Array("A0008"), //업무규칙
  79. new Array("A0212"), //코드군
  80. new Array("/root/init/cmblist/doctrinetrgtmanposinfo"), //노드
  81. true, //minimum : true TRZBC00105
  82. new Array("cdid"), //sorting 항목
  83. new Array("asc")
  84. );
  85. addComboItem("cmb_doctrinetrgtmanposcd", "", "", "above");
  86. rdo_doctrinecd.select(0);
  87. cmb_doctrinetrgtmanposcd.select(0);
  88. //등록일자를 오늘 기준으로 세팅
  89. var CurrentDate = getCurrentDate();
  90. model.setValue("/root/send/reqdata/attdfromdd", CurrentDate.substr(0, 6) + "01");
  91. model.setValue("/root/send/reqdata/attdtodd", CurrentDate);
  92. model.removeNodeset("/root/main/doatinfo/doatlist");
  93. model.refresh();
  94. }
  95. // 조회
  96. function fSearch()
  97. {
  98. if (ipt_trgtmannm.currentText.length > 0 && ipt_trgtmannm.currentText.length < 2) {
  99. messageBox("대상자명은 2글자 이상으로 해주십시요!","E999","");
  100. model.setFocus("ipt_trgtmannm");
  101. return;
  102. }
  103. if (ipt_lactrnm.currentText.length > 0 && ipt_lactrnm.currentText.length < 2) {
  104. messageBox("강사명은 2글자 이상으로 해주십시요!","E999","");
  105. model.setFocus("ipt_lactrnm");
  106. return;
  107. }
  108. // reqGetAttdncList
  109. // getAttdncList
  110. if (submit("TRAYA03301", false) == true)
  111. {
  112. grd_list.fixedcellischeck(0, 1) = false;
  113. //grd_list.fixedcellcheckbox(0,0) = false;
  114. //node 복사
  115. model.removeNodeset("/root/temp/doatinfo");
  116. model.makeNode("/root/temp/doatinfo");
  117. model.copyNode("/root/temp/doatinfo","/root/main/doatinfo");
  118. }
  119. else
  120. {
  121. messageBox("조회를", "E009");
  122. }
  123. }
  124. // 저장
  125. function fSave(status)
  126. {
  127. if (status == "u")
  128. {
  129. if (instance1.selectSingleNode("/root/main/doatinfo").xml == instance1.selectSingleNode("/root/temp/doatinfo").xml) {
  130. messageBox("변경된 데이터가 ","I004");
  131. return;
  132. }
  133. }
  134. var checkyn = "N";
  135. for (var i=0; i<grd_list.rows; i++)
  136. {
  137. var chk = model.getValue("/root/main/doatinfo/doatlist[" + i + "]/chk");
  138. var outerlactryn = model.getValue("/root/main/doatinfo/doatlist[" + i + "]/outerlactryn");
  139. var lactrnm = model.getValue("/root/main/doatinfo/doatlist[" + i + "]/lactrnm");
  140. var lactrid = model.getValue("/root/main/doatinfo/doatlist[" + i + "]/lactrid");
  141. if (chk == "Y")
  142. {
  143. model.setValue("/root/main/doatinfo/doatlist[" + i + "]/status", status);
  144. checkyn = "Y";
  145. if(lactrid ==""){
  146. if (outerlactryn =="N" || lactrnm == "" ){
  147. messageBox("강사정보를","C002" );
  148. model.refresh();
  149. return;
  150. }
  151. }
  152. }
  153. }
  154. if (checkyn == "N")
  155. {
  156. messageBox("선택한 대상자가", "I004");
  157. return;
  158. }
  159. if (status == "d")
  160. {
  161. var btn = messageBox("선택한 대상자를", "Q001");
  162. if (btn == '7')
  163. {
  164. return;
  165. }
  166. }
  167. model.resetInstanceNode("/root/send/savedata");
  168. model.setValue("/root/send/savedata", grd_list.getUpdateDataAll("u"));
  169. if (submit("TXAYA03301", false) == true)
  170. {
  171. messageBox("저장이","I002");
  172. grd_list.clearStatus();
  173. fSearch();
  174. }
  175. else
  176. {
  177. //messageBox("저장에", "E009");
  178. }
  179. }
  180. //강사 팝업
  181. function fSearchLactr() {
  182. var lrow = grd_list.row;
  183. if (grd_list.rows <= 1) return;
  184. if (lrow < 1) return;
  185. var colname = grd_list.colAttribute(grd_list.col, "ref");
  186. //alert(colname);
  187. if (colname == "lactrid")
  188. {
  189. if (model.getValue("/root/main/doatinfo/doatlist[" + lrow +"]/outerlactryn") != "Y")
  190. {
  191. model.resetInstanceNode("/root/popdata");
  192. modal("SPAYA02800", 1, 200, 100);
  193. //modal("SPAYA02800",null,null,null, "SPAYA02800", "/root/actsource", "/root/main/actsource");
  194. if (model.getValue("/root/popdata/conslrid") != "")
  195. {
  196. model.setValue("/root/main/doatinfo/doatlist[" + lrow + "]/lactrid", model.getValue("/root/popdata/conslrid"));
  197. model.setValue("/root/main/doatinfo/doatlist[" + lrow + "]/lactrnm", model.getValue("/root/popdata/conslrnm"));
  198. model.setValue("/root/main/doatinfo/doatlist[" + lrow + "]/outerlactryn", "N");
  199. }
  200. }
  201. model.refresh();
  202. }else if (colname == "outerlactryn")
  203. {
  204. //alert("aa");
  205. model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm");
  206. model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid");
  207. model.refresh();
  208. }
  209. /*
  210. var chkflag = setParameter("chkflag", 'doctrinelactr');
  211. modal("SPAYA02800", 1, 200, 100);
  212. if (model.getValue("/root/main/attdabsnrgst/attdabsnrgstinfo/lactrid") != "") {
  213. model.resetInstanceNode("/root/main/attdabsnrgst/attdabsnrgstinfo/outer_chk");
  214. ipt_lactrnm.disabled = true;
  215. } else {
  216. ipt_lactrnm.disabled = false;
  217. }
  218. model.refresh();
  219. */
  220. }
  221. // 강사명 삭제시 코드 삭제
  222. function fGrdValueChanged()
  223. {
  224. var lrow = grd_list.row;
  225. if (grd_list.rows <= 1) return;
  226. if (lrow < 1) return;
  227. var colname = grd_list.colAttribute(grd_list.col, "ref");
  228. //alert(colname);
  229. if (colname == "lactrnm")
  230. {
  231. if (grd_list.labelMatrix(lrow, grd_list.col) == "")
  232. {
  233. model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm");
  234. model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid");
  235. model.refresh();
  236. }
  237. }
  238. }
  239. //외부 강사를 체크했을 경우
  240. function fClickOuter_Chk() {
  241. var lrow = grd_list.row;
  242. var lcol = grd_list.col;
  243. if (lrow < 1) return;
  244. var colname = grd_list.colAttribute(lcol, "ref");
  245. //alert(colname);
  246. if (colname == "outerlactryn")
  247. {
  248. //alert("aa");
  249. model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm");
  250. model.resetInstanceNode("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid");
  251. model.refresh();
  252. }
  253. }
  254. // entercell
  255. function fGrdEnterCell()
  256. {
  257. if (grd_list.colType(grd_list.col) == "input")
  258. grd_list.editCell();
  259. //alert(grd_list.colType(grd_list.col));
  260. //if (grd_list.colType(grd_list.col) == "inputdate")
  261. //grd_list.editCell();
  262. }
  263. function fGrdKeyDown()
  264. {
  265. var lrow = grd_list.row;
  266. var lcol = grd_list.col;
  267. if (lrow < 1) return;
  268. var colname = grd_list.colAttribute(lcol, "ref");
  269. //alert(colname);
  270. if (colname == "lactrnm")
  271. {
  272. if (model.getValue("/root/main/doatinfo/doatlist[" + lrow +"]/outerlactryn") != "Y")
  273. {
  274. if(event.keyCode==13)
  275. {
  276. model.resetInstanceNode("/root/popdata");
  277. var pastor = "N";
  278. var pastornm = grd_list.textMatrix(lrow, lcol);
  279. //alert(pastornm);
  280. fGetConslrID(pastornm);
  281. model.refresh();
  282. }
  283. }
  284. }
  285. }
  286. // 담당원목자명/주례자명으로 찾기
  287. function fGetConslrID(pastornm)
  288. {
  289. var lrow = grd_list.row;
  290. model.removeNodeset('/root/send/conslrpastor');
  291. model.resetInstanceNode("/root/hidden/conslrpastor/chrgconslrlistinfo");
  292. model.makeNode('/root/send/conslrpastor/conslrpastornm');
  293. model.setValue('/root/send/conslrpastor/conslrpastornm', pastornm);
  294. if (pastornm == "")
  295. {
  296. model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm", "");
  297. model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid", "");
  298. model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/outerlactryn", "N");
  299. return;
  300. }
  301. if(submit('TRAYA01303', false) == true)
  302. {
  303. var nodecnt = model.instances(0).selectNodes("/root/hidden/conslrpastor/chrgconslrlistinfo").length;
  304. // 두건 이상일때는 팝업
  305. if (nodecnt > 1)
  306. {
  307. fSearchLactr()
  308. }
  309. else
  310. {
  311. var conslrid = model.getValue('/root/hidden/conslrpastor/chrgconslrlistinfo/conslrpastorid');
  312. // 찾는 사람이 없을 때도 팝업
  313. if (conslrid == "")
  314. {
  315. fSearchLactr()
  316. }
  317. else
  318. {
  319. model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/lactrid", model.getValue("/root/hidden/conslrpastor/chrgconslrlistinfo/conslrpastorid"));
  320. model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/lactrnm", model.getValue("/root/hidden/conslrpastor/chrgconslrlistinfo/conslrpastornm"));
  321. model.setValue("/root/main/doatinfo/doatlist[" + lrow +"]/outerlactryn", "N");
  322. }
  323. }
  324. }
  325. }
  326. ]]>
  327. </script>
  328. </xhtml:head>
  329. <xhtml:body pagewidth="950" pageheight="543" guideline="1,944;2,543;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  330. <group id="group3" scroll="auto" style="left:15px; top:0px; width:915px; height:515px; ">
  331. <group id="group2" style="left:0px; top:0px; width:915px; height:65px; vertical-align:top; ">
  332. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:915px; height:60px; "/>
  333. <caption id="caption2" class="search_name" style="left:280px; top:10px; width:101px; height:17px; ">출석일자 :</caption>
  334. <button id="btn_search" class="btn1_letter2" style="left:845px; top:20px; width:56px; height:22px; ">
  335. <caption>조회</caption>
  336. <script type="javascript" ev:event="DOMActivate">
  337. <![CDATA[
  338. fSearch();
  339. model.refresh();
  340. ]]>
  341. </script>
  342. </button>
  343. <caption id="caption9" class="search_no_b" style="left:474px; top:9px; width:12px; height:17px; ">~</caption>
  344. <caption id="caption3" class="search_name" style="left:610px; top:10px; width:99px; height:17px; ">대상자구분 :</caption>
  345. <line id="line13" class="line_4" style="x1:829px; y1:10px; x2:829px; y2:53px; "/>
  346. <caption id="caption4" class="search_name" style="left:15px; top:10px; width:98px; height:17px; ">교 리 명 :</caption>
  347. <select1 id="rdo_doctrinecd" ref="/root/send/reqdata/doctrinecd" class="radio_search" overflow="visible" appearance="full" cellspacing="5" cols="2" rows="1" style="left:105px; top:10px; width:150px; height:20px; border-style:none; ">
  348. <choices>
  349. <itemset nodeset="/root/init/cmblist/doctrineinfo/A0211">
  350. <label ref="cdnm"/>
  351. <value ref="cdid"/>
  352. </itemset>
  353. </choices>
  354. </select1>
  355. <input id="ipt_attdfromdd" ref="/root/send/reqdata/attdfromdd" class="input_default" inputtype="date" style="left:370px; top:9px; width:100px; height:19px; "/>
  356. <input id="ipt_attdtodd" ref="/root/send/reqdata/attdtodd" class="input_default" inputtype="date" style="left:490px; top:9px; width:100px; height:19px; "/>
  357. <select1 id="cmb_doctrinetrgtmanposcd" ref="/root/send/reqdata/doctrinetrgtmanposcd" class="combo_search" appearance="minimal" style="left:715px; top:9px; width:100px; height:19px; ">
  358. <choices>
  359. <itemset nodeset="/root/init/cmblist/doctrinetrgtmanposinfo/A0008A0212">
  360. <label ref="cdnm"/>
  361. <value ref="cdid"/>
  362. </itemset>
  363. </choices>
  364. </select1>
  365. <input id="ipt_trgtmannm" ref="/root/send/reqdata/trgtmannm" class="input_default" imemode="hangul" appearance="input" style="left:105px; top:35px; width:100px; height:19px; "/>
  366. <input id="ipt_lactrnm" ref="/root/send/reqdata/lactrnm" class="input_default" imemode="hangul" appearance="input" style="left:370px; top:35px; width:100px; height:19px; "/>
  367. <caption id="caption7" class="search_name" style="left:15px; top:35px; width:94px; height:17px; ">대상자명 :</caption>
  368. <caption id="caption8" class="search_name" style="left:280px; top:35px; width:94px; height:17px; ">강 사 명 :</caption>
  369. </group>
  370. <caption id="caption1" class="tit_2" style="left:5px; top:75px; width:126px; height:14px; ">교리출결자 조회</caption>
  371. <line id="line1" class="line_1" style="x1:0px; y1:90px; x2:915px; y2:90px; "/>
  372. <datagrid id="grd_list" nodeset="/root/main/doatinfo/doatlist" autoresize="true" caption="^대상자소속^대상자명^출석일자^생년월일^강사명^강사명^외부강사^교리진도^caption1^caption2^caption3^caption4" colsep="^" colwidth="36, 81, 100, 95, 88, 90, 103, 57, 250, 100, 100, 100, 100" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:95px; width:915px; height:415px; ">
  373. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  374. <col ref="doctrinetrgtmanposnm"/>
  375. <col ref="trgtmannm"/>
  376. <col ref="attdncdd" format="yyyy-mm-dd" style="text-align:center; "/>
  377. <col ref="brthdatedd" format="yyyy-mm-dd" style="text-align:center; "/>
  378. <col imemode="hangul" ref="lactrnm" type="input" maxlength="10"/>
  379. <col disabled="true" imemode="hangul" ref="lactrid" type="inputbutton"/>
  380. <col checkvalue="Y,N" ref="outerlactryn" type="checkbox"/>
  381. <col imemode="hangul" ref="doctrineprogrs" type="input"/>
  382. <col ref="trgtmanid" visibility="hidden"/>
  383. <col ref="rgstdd" visibility="hidden"/>
  384. <col ref="seqno" visibility="hidden"/>
  385. <col ref="status" visibility="hidden"/>
  386. <script type="javascript" ev:event="onkeydown">
  387. <![CDATA[
  388. //fGrdKeyDown();
  389. //model.refresh();
  390. ]]>
  391. </script>
  392. <script type="javascript" ev:event="xforms-select">
  393. <![CDATA[
  394. //fClickOuter_Chk();
  395. ]]>
  396. </script>
  397. <script type="javascript" ev:event="onentercell">
  398. <![CDATA[
  399. fGrdEnterCell();
  400. ]]>
  401. </script>
  402. <script type="javascript" ev:event="onclick">
  403. <![CDATA[
  404. fSearchLactr();
  405. ]]>
  406. </script>
  407. <script type="javascript" ev:event="onkeypress">
  408. <![CDATA[
  409. fGrdKeyDown();
  410. model.refresh();
  411. ]]>
  412. </script>
  413. <script type="javascript" ev:event="xforms-value-changed">
  414. <![CDATA[
  415. fGrdValueChanged();
  416. //model.refresh();
  417. ]]>
  418. </script>
  419. </datagrid>
  420. <button id="btn_save" class="btn5_letter2" style="left:825px; top:70px; width:42px; height:19px; ">
  421. <caption>저장</caption>
  422. <script type="javascript" ev:event="DOMActivate">
  423. <![CDATA[
  424. var status = "u";
  425. fSave(status);
  426. model.refresh();
  427. ]]>
  428. </script>
  429. </button>
  430. <button id="btn_del" class="btn5_letter2" style="left:870px; top:70px; width:42px; height:19px; ">
  431. <caption>삭제</caption>
  432. <script type="javascript" ev:event="DOMActivate">
  433. <![CDATA[
  434. var status = "d";
  435. fSave(status);
  436. model.refresh();
  437. ]]>
  438. </script>
  439. </button>
  440. </group>
  441. <group id="group1" scroll="auto" style="left:0px; top:516px; width:930px; height:27px; ">
  442. <button id="btn_cancel" class="btn4_letter2" style="left:871px; top:5px; width:56px; height:22px; ">
  443. <caption>닫기</caption>
  444. <close ev:event="DOMActivate"/>
  445. </button>
  446. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:915px; y2:0px; "/>
  447. </group>
  448. </xhtml:body>
  449. </xhtml:html>