SMZSU10400_팀단위근무지관리.xrw 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  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. <searchpanel>
  11. <managerid/>
  12. <managernm/>
  13. <managedinstcd/>
  14. <manageddeptcd/>
  15. </searchpanel>
  16. <memberlistpanel>
  17. </memberlistpanel>
  18. <memberdutplcepanel/>
  19. </main>
  20. <hidden>
  21. <searchpanel>
  22. <managedinstlist/>
  23. <manageddeptlist/>
  24. </searchpanel>
  25. <instlist/>
  26. <result/>
  27. </hidden>
  28. <send>
  29. <data>
  30. <managerid/>
  31. <managedinstcd/>
  32. <manageddeptcd/>
  33. <memberid/>
  34. <updated/>
  35. </data>
  36. </send>
  37. </root>
  38. </instance>
  39. <script type="javascript" ev:event="xforms-ready">
  40. <![CDATA[
  41. var userid = getUserInfo("userid");
  42. var usernm = getUserInfo("usernm");
  43. var dutinstcd = getUserInfo("dutinstcd");
  44. var dutunitcd = getUserInfo("dutunitcd");
  45. model.setValue("/root/main/searchpanel/managerid", userid);
  46. model.setValue("/root/main/searchpanel/managernm", usernm);
  47. model.setValue("/root/send/data/managerid", userid);
  48. submit("TRZSU10201");
  49. var managedinstlist = instance1.selectNodes("/root/hidden/searchpanel/managedinstlist/managedinst");
  50. if(managedinstlist.length>0){
  51. var default_managedinstcd = model.getValue("/root/hidden/searchpanel/managedinstlist/managedinst[1]/managedinstcd");
  52. model.setValue("/root/main/searchpanel/managedinstcd", default_managedinstcd);
  53. model.setValue("/root/send/data/managedinstcd", default_managedinstcd);
  54. submit("TRZSU10202");
  55. var default_manageddeptcd = model.getValue("/root/hidden/searchpanel/manageddeptlist/manageddept[1]/manageddeptcd");
  56. model.setValue("/root/main/searchpanel/manageddeptcd", default_manageddeptcd);
  57. }else{
  58. messageBox("관리자가 아니므로 화면을 조작", "E001");
  59. body.disabled = true;
  60. }
  61. zbcfGetCodeList(new Array("Z0007"), new Array("/root/hidden/instlist"), true, new Array("cdnm"), new Array("asc"));
  62. model.refresh();
  63. ]]>
  64. </script>
  65. <submission id="TRZSU10201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/searchpanel/managedinstlist"/>
  66. <submission id="TRZSU10202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/searchpanel/manageddeptlist"/>
  67. <submission id="TRZSU10203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/memberlistpanel"/>
  68. <submission id="TRZSU10204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/memberdutplcepanel"/>
  69. <submission id="TRZBC00101"/>
  70. <submission id="TXZSU10117" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/result"/>
  71. </model>
  72. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  73. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  74. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  75. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  76. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  77. </xhtml:head>
  78. <xhtml:body guideline="1,1194;2,770;2,771;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  79. <group id="grp_tle" style="left:0px; top:0px; width:1194px; height:13px; ">
  80. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">팀단위 근무지관리</caption>
  81. </group>
  82. <group id="grp_biz" scroll="auto" style="left:0px; top:36px; width:1195px; height:744px; ">
  83. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:100px; vertical-align:top; ">
  84. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:45px; background-color:#fffbf2; border-color:#ffd799; "/>
  85. <line id="line13" style="x1:1105px; y1:8px; x2:1105px; y2:36px; border-color:#ffe4bb; border-left-style:solid; "/>
  86. <caption id="caption33" class="search_name" style="left:5px; top:15px; width:96px; height:17px; ">팀장 ID :</caption>
  87. <input id="ipt_searchterm" ref="/root/main/searchpanel/managerid" class="input_s_essential" navindex="2" editable="false" imemode="hangul" style="left:89px; top:14px; width:100px; height:19px; "/>
  88. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:12px; width:56px; height:22px; ">
  89. <caption>조회</caption>
  90. <script type="javascript" ev:event="DOMActivate">
  91. <![CDATA[
  92. model.removenode("/root/main/memberlistpanel");
  93. model.removenode("/root/main/memberdutplcepanel");
  94. model.makeNode("/root/main/memberlistpanel");
  95. model.makeNode("/root/main/memberdutplcepanel");
  96. var managedinstcd = model.getValue("/root/main/searchpanel/managedinstcd");
  97. var manageddeptcd = model.getValue("/root/main/searchpanel/manageddeptcd");
  98. model.setValue("/root/send/data/managedinstcd", managedinstcd);
  99. model.setValue("/root/send/data/manageddeptcd", manageddeptcd);
  100. submit("TRZSU10203");
  101. model.refresh();
  102. ]]>
  103. </script>
  104. </button>
  105. <select1 id="cmb_searchcondition" ref="/root/main/searchpanel/manageddeptcd" class="combo_default" navindex="1" appearance="minimal" style="left:745px; top:14px; width:160px; height:19px; ">
  106. <choices>
  107. <itemset nodeset="/root/hidden/searchpanel/manageddeptlist/manageddept">
  108. <label ref="manageddeptnm"/>
  109. <value ref="manageddeptcd"/>
  110. </itemset>
  111. </choices>
  112. </select1>
  113. <caption id="caption1" class="search_name" style="left:200px; top:15px; width:96px; height:17px; ">팀장 이름 :</caption>
  114. <input id="input1" ref="/root/main/searchpanel/managernm" class="input_s_essential" navindex="2" editable="false" imemode="hangul" style="left:295px; top:14px; width:100px; height:19px; ">
  115. <script type="javascript" ev:event="onkeyup">
  116. <![CDATA[
  117. inputEnterKey("btn_search", "DOMActivate");
  118. ]]>
  119. </script>
  120. </input>
  121. <caption id="caption2" class="search_name" style="left:655px; top:15px; width:117px; height:17px; ">관리부서 :</caption>
  122. <caption id="caption4" class="search_name" style="left:400px; top:15px; width:117px; height:17px; ">관리기관 :</caption>
  123. <select1 id="combo1" ref="/root/main/searchpanel/managedinstcd" class="combo_default" navindex="1" appearance="minimal" style="left:490px; top:14px; width:160px; height:19px; ">
  124. <choices>
  125. <itemset nodeset="/root/hidden/searchpanel/managedinstlist/managedinst">
  126. <label ref="managedinstnm"/>
  127. <value ref="managedinstcd"/>
  128. </itemset>
  129. </choices>
  130. <script type="javascript" ev:event="xforms-value-changed">
  131. <![CDATA[
  132. var managed_instcd = model.getValue("/root/main/searchpanel/managedinstcd");
  133. model.setValue("/root/send/data/managedinstcd", managed_instcd);
  134. submit("TRZSU10202");
  135. var default_manageddeptcd = model.getValue("/root/hidden/searchpanel/manageddeptlist/manageddept[1]/manageddeptcd");
  136. model.setValue("/root/main/searchpanel/manageddeptcd", default_manageddeptcd);
  137. model.refresh();
  138. ]]>
  139. </script>
  140. </select1>
  141. </group>
  142. <line id="line1" class="line_1" style="x1:0px; y1:113px; x2:245px; y2:113px; "/>
  143. <caption id="caption17" class="tit_2" style="left:0px; top:95px; width:160px; height:14px; ">팀원목록</caption>
  144. <button id="btn_create" class="btn2_letter5" navindex="57" style="left:960px; top:90px; width:75px; height:19px; ">
  145. <caption>근무지추가</caption>
  146. <script type="javascript" ev:event="DOMActivate">
  147. <![CDATA[
  148. var row = grd_dutplcelist.row;
  149. if(row<1){
  150. messageBox("근무지마다 업무에 영향을 주는 추가속성이 존재하여 기존 근무지를 참조하여 추가해야 하므로 근무지를 선택하시기 바랍니다.", "E");
  151. return;
  152. }
  153. grd_dutplcelist.addRow();
  154. var create = grd_dutplcelist.rows-1;
  155. grd_dutplcelist.cellAttribute("disabled", create, grd_dutplcelist.colRef("fromdd")) = "false";
  156. grd_dutplcelist.cellAttribute("disabled", create, grd_dutplcelist.colRef("todd")) = "false";
  157. model.copyNode("/root/main/memberdutplcepanel/memberdutplce["+create+"]", "/root/main/memberdutplcepanel/memberdutplce["+row+"]");
  158. model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/action", "create");
  159. model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/dutplcecd", "");
  160. model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/dutplcenm", "");
  161. model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/maindutplceflag", "false");
  162. model.setValue("/root/main/memberdutplcepanel/memberdutplce["+create+"]/fromdd", getCurrentDate());
  163. model.refresh();
  164. ]]>
  165. </script>
  166. </button>
  167. <line id="line4" class="line_3" style="x1:0px; y1:112px; x2:1195px; y2:112px; "/>
  168. <button id="btn_closing" class="btn2_letter5" navindex="58" style="left:1110px; top:90px; width:75px; height:19px; ">
  169. <caption>근무지마감</caption>
  170. <script type="javascript" ev:event="DOMActivate">
  171. <![CDATA[
  172. var row = grd_dutplcelist.row;
  173. var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
  174. if(action=="read"){
  175. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = getCurrentDate();
  176. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevtodd")) = getCurrentDate();
  177. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "closing";
  178. grd_dutplcelist.rowStatus(row) = 2;
  179. grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("dutplceinstcd")) = "true";
  180. grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("dutplcecd")) = "true";
  181. grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("maindutplceflag")) = "true";
  182. grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("todd")) = "false";
  183. model.refresh();
  184. }else if(action=="closing"){
  185. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("inittodd"));
  186. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "read";
  187. grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("dutplceinstcd")) = "false";
  188. grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("dutplcecd")) = "false";
  189. grd_dutplcelist.cellAttribute("disabled", row, grd_dutplcelist.colRef("maindutplceflag")) = "false";
  190. grd_dutplcelist.rowStatus(row) = 0;
  191. model.refresh();
  192. }else{
  193. messageBox("근무지를 추가하거나 변경한 경우에는 마감할수 없습니다.", "E");
  194. }
  195. ]]>
  196. </script>
  197. </button>
  198. <datagrid id="grd_memberlist" nodeset="/root/main/memberlistpanel/member" caption="사용자ID^사용자명" colsep="^" colwidth="100, 127" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:117px; width:245px; height:618px; ">
  199. <col ref="memberid"/>
  200. <col ref="membernm"/>
  201. <script type="javascript" ev:event="ondblclick">
  202. <![CDATA[
  203. var row = grd_memberlist.row;
  204. if(row<1){
  205. return;
  206. }
  207. var memberid = grd_memberlist.valueMatrix(row, grd_memberlist.colRef("memberid"));
  208. model.setValue("/root/send/data/memberid", memberid);
  209. submit("TRZSU10204");
  210. for(var i=0; i<grd_dutplcelist.rows; i++){
  211. grd_dutplcelist.cellAttribute("disabled", i, grd_dutplcelist.colRef("maindutplceflag")) = "false";
  212. }
  213. model.refresh();
  214. ]]>
  215. </script>
  216. </datagrid>
  217. <datagrid id="grd_dutplcelist" nodeset="/root/main/memberdutplcepanel/memberdutplce" caption="action^근무지기관^이전근무지기관^초기근무지기관^근무지^근무지^이전근무지^이전근무지^초기근무지^초기근무지^시작일^이전시작일^기준시작일^종료일^이전종료일^기준종료일^직위^직종^휴대폰^이메일^주근무지" colsep="^" colwidth="54, 120, 100, 100, 110, 70, 100, 100, 100, 100, 85, 100, 100, 85, 100, 100, 70, 70, 110, 128, 54" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:249px; top:117px; width:944px; height:618px; ">
  218. <col ref="action" visibility="hidden"/>
  219. <col ref="dutplceinstcd" type="combo" style="left:66px; top:23px; width:120px; height:23px; ">
  220. <choices>
  221. <itemset nodeset="/root/hidden/instlist/Z0007">
  222. <label ref="cdnm"/>
  223. <value ref="cdid"/>
  224. </itemset>
  225. </choices>
  226. <script type="javascript" ev:event="onclick">
  227. <![CDATA[
  228. var row = grd_dutplcelist.row;
  229. var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
  230. if(action=="closing"){
  231. messageBox("마감된 근무지기관은 변경할수 없습니다.", "E");
  232. return;
  233. }
  234. ]]>
  235. </script>
  236. </col>
  237. <col ref="prevdutplceinstcd" visibility="hidden"/>
  238. <col ref="initdutplceinstcd" visibility="hidden"/>
  239. <col disabled="false" ref="dutplcenm" type="inputbutton">
  240. <script type="javascript" ev:event="onbuttonclick">
  241. <![CDATA[
  242. var row = grd_dutplcelist.row;
  243. if(row<1){
  244. return;
  245. }
  246. var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
  247. if(action=="closing"){
  248. messageBox("마감된 근무지는 변경할수 없습니다.", "E");
  249. return;
  250. }
  251. var search_condition = "deptnm";
  252. var search_term = model.getValue("/root/main/sample1/deptcd");
  253. var receive_deptcd_path = "/root/main/memberdutplcepanel/memberdutplce["+row+"]/dutplcecd";
  254. var receive_deptnm_path = "/root/main/memberdutplcepanel/memberdutplce["+row+"]/dutplcenm";
  255. var standard_yn = null;
  256. var ord_deptflag = null;
  257. var prev_dutplceinstcd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplceinstcd"));
  258. var prev_dutplcecd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcecd"));
  259. var prev_dutplcenm = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcenm"));
  260. zbcfOpenAssignedInstDeptCodeList(prev_dutplceinstcd, search_condition, search_term, receive_deptcd_path, receive_deptnm_path, standard_yn, ord_deptflag, new Array("deptcd", "depthngnm"));
  261. var next_dutplceinstcd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplceinstcd"));
  262. var next_dutplcecd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcecd"));
  263. var next_dutplcenm = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcenm"));
  264. if(prev_dutplceinstcd==next_dutplceinstcd&&prev_dutplcecd==next_dutplcecd){
  265. messageBox("근무지정보가 변경되지 않았습니다.", "E");
  266. return;
  267. }else{
  268. for(var i=1; i<grd_dutplcelist.rows; i++){
  269. if(i==row){
  270. continue;
  271. }
  272. var comp_dutplceinstcd = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("dutplceinstcd"));
  273. var comp_dutplcecd = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("dutplcecd"));
  274. if(next_dutplceinstcd==comp_dutplceinstcd&&next_dutplcecd==comp_dutplcecd){
  275. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplceinstcd")) = prev_dutplceinstcd;
  276. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcecd")) = prev_dutplcecd;
  277. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcenm")) = prev_dutplcenm;
  278. messageBox("동일한 근무지 정보가 존재합니다.", "E");
  279. return;
  280. }
  281. }
  282. }
  283. var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
  284. if(action=="create"){
  285. grd_dutplcelist.rowStatus(row) = 1;
  286. }else if(action=="read"||action=="main"){
  287. grd_dutplcelist.rowStatus(row) = 2;
  288. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "change";
  289. }
  290. model.refresh();
  291. ]]>
  292. </script>
  293. </col>
  294. <col ref="dutplcecd"/>
  295. <col ref="prevdutplcecd" visibility="hidden"/>
  296. <col ref="prevdutplcenm" visibility="hidden"/>
  297. <col ref="initdutplcecd" visibility="hidden"/>
  298. <col ref="initdutplcenm" visibility="hidden"/>
  299. <col disabled="true" ref="fromdd" type="inputdate"/>
  300. <col ref="prevfromdd" visibility="hidden"/>
  301. <col ref="initfromdd" visibility="hidden"/>
  302. <col disabled="true" ref="todd" type="inputdate"/>
  303. <col ref="prevtodd" visibility="hidden"/>
  304. <col ref="inittodd" visibility="hidden"/>
  305. <col ref="jobposnm"/>
  306. <col ref="jobkindnm"/>
  307. <col ref="mpphonno" style="left:600px; top:23px; width:110px; height:23px; "/>
  308. <col ref="email"/>
  309. <col ref="maindutplceflag" type="checkbox">
  310. <script type="javascript" ev:event="onclick">
  311. <![CDATA[
  312. var row = grd_dutplcelist.row;
  313. var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
  314. if(action=="closing"){
  315. messageBox("마감된 근무지의 주근무지 여부는 변경할수 없습니다.", "E");
  316. return;
  317. }
  318. ]]>
  319. </script>
  320. </col>
  321. <script type="javascript" ev:event="xforms-value-changed">
  322. <![CDATA[
  323. var row = grd_dutplcelist.row;
  324. var col = grd_dutplcelist.col;
  325. if(col==grd_dutplcelist.colRef("dutplceinstcd")){
  326. var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
  327. if(action!="create"){
  328. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "change";
  329. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcecd")) ="";
  330. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevdutplcecd")) = "";
  331. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("dutplcenm")) = "";
  332. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevdutplcenm")) = "";
  333. model.refresh();
  334. }
  335. }else if(col==grd_dutplcelist.colRef("maindutplceflag")){
  336. var maindutplceflag = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("maindutplceflag"));
  337. if(maindutplceflag == "true"){
  338. for(var i=1; i<grd_dutplcelist.rows; i++){
  339. if(row==i) {
  340. continue;
  341. }else{
  342. var comp_maindutplceflag = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("maindutplceflag"));
  343. if(comp_maindutplceflag=="true"){
  344. messageBox("주근무지는 한개만 존재합니다.", "E");
  345. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("maindutplceflag")) = "false";
  346. return;
  347. }
  348. }
  349. }
  350. }
  351. var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
  352. if(action=="read"){
  353. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action")) = "main";
  354. }
  355. var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
  356. if(action=="read"){
  357. grd_dutplcelist.rowStatus(row) = 0;
  358. }else if(action=="change"){
  359. grd_dutplcelist.rowStatus(row) = 2;
  360. }else if(action=="create"){
  361. grd_dutplcelist.rowStatus(row) = 1;
  362. }else if(action=="main"){
  363. grd_dutplcelist.rowStatus(row) = 2;
  364. }else{
  365. messageBox("조작관련 Error발생 업무담당자에게 문의하세요", "E");
  366. return;
  367. }
  368. }else if(col==grd_dutplcelist.colRef("fromdd")){
  369. var prev_fromdd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevfromdd"));
  370. var fromdd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd"));
  371. var todd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd"));
  372. var valid = isValidDateTime(fromdd, "YYYYMMDD");
  373. var currentdate = getCurrentDate();
  374. if(!valid){
  375. messageBox("시작일자의 날짜 포맷이 올바르지 않습니다.", "E");
  376. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd")) = prev_fromdd;
  377. model.refresh();
  378. grd_dutplcelist.row= row;
  379. grd_dutplcelist.col= grd_dutplcelist.colRef("fromdd");
  380. model.setFocus("grd_dutplcelist");
  381. return;
  382. }else if(fromdd>todd){
  383. messageBox("시작일자는 종료일자보다 클수 없습니다.", "E");
  384. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd")) = prev_fromdd;
  385. model.refresh();
  386. grd_dutplcelist.row= row;
  387. grd_dutplcelist.col= grd_dutplcelist.colRef("fromdd");
  388. model.setFocus("grd_dutplcelist");
  389. return;
  390. }else if(currentdate<fromdd){
  391. messageBox("시작일자는 현재일자를 포함해야 합니다.", "E");
  392. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd")) = prev_fromdd;
  393. model.refresh();
  394. grd_dutplcelist.row= row;
  395. grd_dutplcelist.col= grd_dutplcelist.colRef("fromdd");
  396. model.setFocus("grd_dutplcelist");
  397. return;
  398. }else{
  399. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevfromdd")) = fromdd;
  400. }
  401. }else if(col==grd_dutplcelist.colRef("todd")){
  402. var prev_todd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevtodd"));
  403. var fromdd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("fromdd"));
  404. var todd = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd"));
  405. var valid = isValidDateTime(todd, "YYYYMMDD");
  406. var currentdate = getCurrentDate();
  407. if(!valid){
  408. messageBox("종료일자의 날짜 포맷이 올바르지 않습니다.", "E");
  409. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = prev_todd;
  410. model.refresh();
  411. grd_dutplcelist.row= row;
  412. grd_dutplcelist.col= grd_dutplcelist.colRef("todd");
  413. model.setFocus("grd_dutplcelist");
  414. return;
  415. }else if(fromdd>todd){
  416. messageBox("시작일자는 종료일자보다 클수 없습니다.", "E");
  417. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = prev_todd;
  418. model.refresh();
  419. grd_dutplcelist.row= row;
  420. grd_dutplcelist.col= grd_dutplcelist.colRef("todd");
  421. model.setFocus("grd_dutplcelist");
  422. return;
  423. }else if(currentdate>todd){
  424. messageBox("종료일자는 현재일자를 포함해야 합니다.", "E");
  425. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("todd")) = prev_todd;
  426. model.refresh();
  427. grd_dutplcelist.row= row;
  428. grd_dutplcelist.col= grd_dutplcelist.colRef("todd");
  429. model.setFocus("grd_dutplcelist");
  430. return;
  431. }else{
  432. grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("prevtodd")) = todd;
  433. }
  434. }
  435. ]]>
  436. </script>
  437. </datagrid>
  438. <line id="line2" class="line_1" style="x1:249px; y1:113px; x2:1193px; y2:113px; "/>
  439. <caption id="caption3" class="tit_2" style="left:250px; top:95px; width:125px; height:13px; ">팀원 근무지 목록</caption>
  440. <button id="button1" class="btn2_letter5" navindex="57" style="left:1035px; top:90px; width:75px; height:19px; ">
  441. <caption>근무지삭제</caption>
  442. <script type="javascript" ev:event="DOMActivate">
  443. <![CDATA[
  444. var row = grd_dutplcelist.row;
  445. var action = grd_dutplcelist.valueMatrix(row, grd_dutplcelist.colRef("action"));
  446. if(action=="create"){
  447. grd_dutplcelist.deleteRow(row);
  448. }else{
  449. messageBox("추가한 근무지만 삭제할수 있습니다.", "E");
  450. }
  451. ]]>
  452. </script>
  453. </button>
  454. </group>
  455. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  456. <button id="btn_save" class="btn4_letter2" style="left:1135px; top:0px; width:56px; height:22px; ">
  457. <caption>저장</caption>
  458. <script type="javascript" ev:event="DOMActivate">
  459. <![CDATA[
  460. var is_updated = false;
  461. var is_maindutplceflag_updated = false;
  462. for(var i=0; i<grd_dutplcelist.rows; i++){
  463. var action = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("action"));
  464. var maindutplceflag = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("maindutplceflag"));
  465. var row_status = grd_dutplcelist.rowStatus(i);
  466. if(maindutplceflag=="true"){
  467. is_maindutplceflag_updated = true;
  468. }
  469. if(row_status>0){
  470. if(!is_updated){
  471. is_updated = true;
  472. }
  473. var dutplceinstcd = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("dutplceinstcd"));
  474. var dutplcecd = grd_dutplcelist.valueMatrix(i, grd_dutplcelist.colRef("dutplcecd"));
  475. if( dutplceinstcd==""){
  476. messageBox("근무지기관는 필수 입력 사항입니다.", "E");
  477. grd_dutplcelist.row = i;
  478. grd_dutplcelist.col = grd_dutplcelist.colRef("dutplceinstcd");
  479. model.setFocus("grd_dutplcelist");
  480. return;
  481. }else if( dutplcecd == "" ){
  482. messageBox("근무지는 필수 입력 사항입니다.", "E");
  483. grd_dutplcelist.row = i;
  484. grd_dutplcelist.col = grd_dutplcelist.colRef("dutplcecd");
  485. model.setFocus("grd_dutplcelist");
  486. return;
  487. }
  488. }
  489. }
  490. if(!is_updated){
  491. messageBox("갱신된 사항이 없습니다.", "E");
  492. return;
  493. }else if(!is_maindutplceflag_updated){
  494. messageBox("주근무지가 등록되지 않았습니다.", "E");
  495. return;
  496. }
  497. var updated = grd_dutplcelist.getUpdateData();
  498. model.setValue("/root/send/data/updated", updated);
  499. submit("TXZSU10117");
  500. model.refresh();
  501. var error_code = new Number(model.getValue("/root/hidden/result/errormessage/errorcode"));
  502. var error_message = model.getValue("/root/hidden/result/errormessage/errormessage")
  503. if(error_code<0){
  504. messageBox(error_message+"('"+error_code+"'), 업무담당자에게 문의하세요", "E");
  505. }else{
  506. var row = grd_memberlist.row;
  507. var memberid = grd_memberlist.valueMatrix(row, grd_memberlist.colRef("memberid"));
  508. model.setValue("/root/send/data/memberid", memberid);
  509. submit("TRZSU10204");
  510. for(var i=0; i<grd_dutplcelist.rows; i++){
  511. grd_dutplcelist.cellAttribute("disabled", i, grd_dutplcelist.colRef("maindutplceflag")) = "false";
  512. }
  513. model.refresh();
  514. messageBox(error_message, "I");
  515. }
  516. ]]>
  517. </script>
  518. </button>
  519. <button id="btn_init" class="btn4_letter3" style="left:1067px; top:0px; width:68px; height:22px; ">
  520. <caption>초기화</caption>
  521. <script type="javascript" ev:event="DOMActivate">
  522. <![CDATA[
  523. model.removenode("/root/main/memberlistpanel");
  524. model.removenode("/root/main/memberdutplcepanel");
  525. model.makeNode("/root/main/memberlistpanel");
  526. model.makeNode("/root/main/memberdutplcepanel");
  527. model.refresh();
  528. ]]>
  529. </script>
  530. </button>
  531. <line id="line3" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  532. </group>
  533. </xhtml:body>
  534. </xhtml:html>