SMRTS00400_근무보고서관리.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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>근무보고서관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <reptinfo>
  11. </reptinfo>
  12. <copyinfo/>
  13. </main>
  14. <hidden/>
  15. <temp>
  16. <choireptitemid/>
  17. <csv>
  18. <qest/>
  19. <item/>
  20. </csv>
  21. </temp>
  22. <init/>
  23. <send>
  24. <req>
  25. <yy/>
  26. <apprtcdrflag/>
  27. <reptinfo/>
  28. </req>
  29. <save>
  30. <reptqestlist/>
  31. <reptitemlist/>
  32. </save>
  33. </send>
  34. </root>
  35. </instance>
  36. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  37. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  38. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  39. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  40. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  41. <script type="javascript" src="../../../mis/tistrngeducplanmngtweb/js/SMRTS00400.js"/>
  42. <script type="javascript" ev:event="xforms-ready">
  43. <![CDATA[
  44. misfMsterDetailSet(grd_reptinfo, null, "TRRTS00502", "Y");
  45. // misfMsterDetailSet(grd_item, grd_reptinfo, "TRRTS00502", "Y");
  46. var today = getCurrentDate();
  47. var cur_yy = parseInt(today.substring(0, 4));
  48. ipt_yy.value=cur_yy;
  49. grd_reptinfo.rowHeight(0) = 30;
  50. misfComboComCdList('R0151', cmb_trngflag);
  51. for (var i=0; i<=grd_reptinfo.cols; i++)
  52. {
  53. grd_reptinfo.mergeCol(i) = false;
  54. }
  55. grd_reptinfo.mergeCol(grd_reptinfo.colRef("catgrysortseq")) = true;
  56. grd_reptinfo.mergeCol(grd_reptinfo.colRef("catgryid")) = true;
  57. grd_reptinfo.mergeCol(grd_reptinfo.colRef("catgrynm")) = true;
  58. grd_reptinfo.refresh();
  59. ]]>
  60. </script>
  61. <submission id="TXRTS00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/main/rs"/>
  62. <submission id="TXRTS00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/main/rs"/>
  63. <submission id="TRRTS00502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/main/reptinfo"/>
  64. <submission id="TRRTS00503" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req/reptinfo" resultref="/root/main/reptinfo"/>
  65. </model>
  66. </xhtml:head>
  67. <xhtml:body>
  68. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  69. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">근무보고서관리</caption>
  70. </group>
  71. <group id="group2" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  72. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:5px; width:1195px; height:36px; background-color:#fffbf2; border-color:#ffd799; "/>
  73. <line id="line207" class="line_1" style="x1:0px; y1:65px; x2:950px; y2:65px; "/>
  74. <button id="btn_search" class="btn1_letter2" navindex="8" style="left:1127px; top:13px; width:56px; height:22px; text-align:left; ">
  75. <caption>조회</caption>
  76. <script type="javascript" ev:event="DOMActivate">
  77. <![CDATA[
  78. if ( !isRequiredControls("ipt_yy", "cmb_trngflag") )
  79. {
  80. return false;
  81. }
  82. if (submit("TRRTS00502"))
  83. {
  84. if (grd_reptinfo.rows > 1)
  85. {
  86. btn_preview.disabled = false;
  87. btn_addqest.disabled = false;
  88. btn_delqest.disabled = false;
  89. btn_execl.disabled = false;
  90. btn_additem.disabled = false;
  91. btn_delitem.disabled = false;
  92. btn_save.disabled = false;
  93. grd_reptinfo.row = 1;
  94. grd_reptinfo.dispatch("onrowchanged");
  95. }
  96. else
  97. {
  98. btn_preview.disabled = true;
  99. btn_addqest.disabled = true;
  100. btn_delqest.disabled = true;
  101. btn_execl.disabled = true;
  102. btn_additem.disabled = true;
  103. btn_delitem.disabled = true;
  104. btn_save.disabled = true;
  105. }
  106. model.setValue("/root/temp/csv/qest", getNodeListCSV(model.instances(0).selectNodes("/root/main/reptinfo/reptqestlist")) );
  107. model.setValue("/root/temp/csv/item", getNodeListCSV(model.instances(0).selectNodes("/root/main/reptinfo/reptitemlist")) );
  108. misfSetReadOnlyCol(grd_reptinfo, "catgryid", true);
  109. }
  110. ]]>
  111. </script>
  112. </button>
  113. <line id="line2" class="line_4" style="x1:1110px; y1:11px; x2:1110px; y2:36px; border-color:#ffe4bb; border-left-style:solid; "/>
  114. <input id="ipt_yy" ref="/root/send/req/yy" class="input_s_essential" format="yyyy" style="left:90px; top:14px; width:55px; height:19px; "/>
  115. <select1 id="cmb_trngflag" ref="/root/send/req/apprtcdrflag" class="combo_s_essential" appearance="minimal" style="left:258px; top:14px; width:90px; height:19px; ">
  116. <choices>
  117. <itemset>
  118. <label/>
  119. <value/>
  120. </itemset>
  121. </choices>
  122. <script type="javascript" ev:event="xforms-select">
  123. <![CDATA[
  124. ]]>
  125. </script>
  126. </select1>
  127. <caption id="cap_trngflag" class="search_name" style="left:160px; top:15px; width:110px; height:17px; ">전공의구분 :</caption>
  128. <caption id="cap_yy" class="search_name" style="left:5px; top:15px; width:86px; height:17px; ">년 도 :</caption>
  129. <datagrid id="grd_reptinfo" nodeset="/root/main/reptinfo/reptqestlist" caption="사용^순서^카테고리ID^카테고리명^년도^전공의구분^seqno^문항ID^질문내용^답변내용^기타답변^필수^순서^사용" colsep="^" colwidth="0, 35, 69, 143, 33, 0, 0, 0, 545, 61, 30, 25, 31, 38" mergecells="bycol" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:70px; width:950px; height:650px; ">
  130. <col ref="catgryuseyn" visibility="hidden"/>
  131. <col ref="catgrysortseq" type="input" style="text-align:center; "/>
  132. <col ref="catgryid" type="input" style="text-align:center; "/>
  133. <col ref="catgrynm" type="input"/>
  134. <col ref="yy" visibility="hidden"/>
  135. <col ref="apprtcdrflag" visibility="visible"/>
  136. <col ref="seqno" visibility="visible"/>
  137. <col ref="reptitemid"/>
  138. <col ref="qestcnts" type="input"/>
  139. <col ref="answcnts" type="combo">
  140. <choices>
  141. <item>
  142. <label>자유입력</label>
  143. <value>1</value>
  144. </item>
  145. <item>
  146. <label>단일선택</label>
  147. <value>2</value>
  148. </item>
  149. <item>
  150. <label>다중선택</label>
  151. <value>3</value>
  152. </item>
  153. </choices>
  154. </col>
  155. <col ref="objtivtestchoicnt" type="combo">
  156. <choices>
  157. <item>
  158. <label>N</label>
  159. <value>0</value>
  160. </item>
  161. <item>
  162. <label>Y</label>
  163. <value>1</value>
  164. </item>
  165. </choices>
  166. </col>
  167. <col ref="essnyn" type="combo">
  168. <choices>
  169. <item>
  170. <label>Y</label>
  171. <value>Y</value>
  172. </item>
  173. <item>
  174. <label>N</label>
  175. <value>N</value>
  176. </item>
  177. </choices>
  178. </col>
  179. <col ref="sortseq" type="input" visibility="visible" style="text-align:center; "/>
  180. <col checkvalue="Y,N" ref="itemuseyn" type="checkbox"/>
  181. <script type="javascript" ev:event="onrowchanged">
  182. <![CDATA[
  183. var reptitemid = grd_reptinfo.valueMatrix(grd_reptinfo.row, grd_reptinfo.colRef("reptitemid"));
  184. grd_item.nodeset = "/root/main/reptinfo/reptitemlist[reptitemid='"+reptitemid+"']";
  185. grd_item.refresh();
  186. if (grd_reptinfo.valueMatrix(grd_reptinfo.row, grd_reptinfo.colRef("answcnts")) == "1" ||
  187. grd_reptinfo.valueMatrix(grd_reptinfo.row, grd_reptinfo.colRef("reptitemid")) == "")
  188. {
  189. btn_additem.disabled = true;
  190. btn_delitem.disabled = true;
  191. }
  192. else
  193. {
  194. btn_additem.disabled = false;
  195. btn_delitem.disabled = false;
  196. }
  197. ]]>
  198. </script>
  199. </datagrid>
  200. <button id="btn_execl" class="btn2_letter4" style="left:880px; top:44px; width:64px; height:19px; ">
  201. <caption>엑셀저장</caption>
  202. <script type="javascript" ev:event="DOMActivate">
  203. <![CDATA[
  204. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  205. if (fileName != "") {
  206. grd_reptinfo.saveExcel(fileName, "sheetname:sheet1;colhiddenextend:true;rowhiddenextend:false;exportfalsecols:0,0;col_1:value;");
  207. }
  208. ]]>
  209. </script>
  210. </button>
  211. <button id="btn_delqest" class="btn2_letter3" style="left:825px; top:44px; width:53px; height:19px; ">
  212. <caption>행삭제</caption>
  213. <script type="javascript" ev:event="DOMActivate">
  214. <![CDATA[
  215. misfGridIUD(grd_reptinfo,"D");
  216. model.refresh();
  217. ]]>
  218. </script>
  219. </button>
  220. <button id="btn_addqest" class="btn2_letter3" style="left:770px; top:44px; width:53px; height:19px; ">
  221. <caption>행추가</caption>
  222. <script type="javascript" ev:event="DOMActivate">
  223. <![CDATA[
  224. var p_row = grd_reptinfo.row;
  225. var p_rows = grd_reptinfo.rows;
  226. grd_reptinfo.insertRow(p_row,"below", "false", "true");
  227. var srcRowIdx = grd_reptinfo.row - 1;
  228. var destRowIdx = grd_reptinfo.row;
  229. var catgryid =grd_reptinfo.valueMatrix(srcRowIdx, grd_reptinfo.colRef("catgryid"));
  230. var catgrynm =grd_reptinfo.valueMatrix(srcRowIdx, grd_reptinfo.colRef("catgrynm"));
  231. var yy = grd_reptinfo.valueMatrix(srcRowIdx, grd_reptinfo.colRef("yy"));
  232. var apprtcdrflag = grd_reptinfo.valueMatrix(srcRowIdx, grd_reptinfo.colRef("apprtcdrflag"));
  233. var catgrysortseq = grd_reptinfo.valueMatrix(srcRowIdx, grd_reptinfo.colRef("catgrysortseq"));
  234. if( p_rows== destRowIdx){
  235. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("yy")) = yy;
  236. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("apprtcdrflag")) = apprtcdrflag;
  237. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("catgryuseyn")) = 'Y';
  238. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("itemuseyn")) = 'Y';
  239. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("catgrysortseq")) = parseFloat(catgrysortseq)+1;
  240. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("sortseq")) = '1';
  241. grd_reptinfo.isReadOnly(destRowIdx.row, grd_reptinfo.colRef("catgryid")) = false;
  242. }else{
  243. grd_reptinfo.isReadOnly(destRowIdx.row, grd_reptinfo.colRef("catgryid")) = true;
  244. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("catgryid")) = catgryid;
  245. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("catgrynm")) = catgrynm;
  246. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("yy")) = yy;
  247. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("apprtcdrflag")) = apprtcdrflag;
  248. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("catgryuseyn")) = "Y";
  249. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("itemuseyn")) = 'Y';
  250. grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("catgrysortseq")) = catgrysortseq;
  251. }
  252. /* for (var i=0; i<grd_reptinfo.cols; i++)
  253. {
  254. grd_reptinfo.valueMatrix(destRowIdx, i) = grd_reptinfo.valueMatrix(srcRowIdx, i);
  255. }
  256. var catgryid = grd_reptinfo.valueMatrix(destRowIdx, grd_reptinfo.colRef("catgryid"));
  257. grd_reptinfo.col = grd_reptinfo.colRef("qestcnts");*/
  258. grd_reptinfo.dispatch("onrowchanged");
  259. grd_reptinfo.refresh();
  260. ]]>
  261. </script>
  262. </button>
  263. <caption id="caption22" class="tit_2" style="left:5px; top:50px; width:80px; height:13px; ">문항</caption>
  264. <datagrid id="grd_item" nodeset="/root/main/reptinfo/reptitemlist" caption="reptitemid^코드^명칭^순서^caption1" colsep="^" colwidth="0, 50, 106, 61, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:955px; top:70px; width:240px; height:650px; ">
  265. <col ref="reptitemid"/>
  266. <col ref="reptitemcd" type="input"/>
  267. <col ref="reptitemnm" type="input"/>
  268. <col ref="sortseq" type="input" maxlength="2"/>
  269. <col ref="useyn" visibility="hidden"/>
  270. </datagrid>
  271. <line id="line3" class="line_1" style="x1:955px; y1:65px; x2:1194px; y2:65px; "/>
  272. <caption id="caption1" class="tit_2" style="left:965px; top:50px; width:80px; height:13px; ">보기</caption>
  273. <button id="btn_delitem" class="btn2_letter3" style="left:1135px; top:44px; width:53px; height:19px; ">
  274. <caption>행삭제</caption>
  275. <script type="javascript" ev:event="DOMActivate">
  276. <![CDATA[
  277. grd_item.deleteRow(grd_item.row, true);
  278. ]]>
  279. </script>
  280. </button>
  281. <button id="btn_additem" class="btn2_letter3" style="left:1080px; top:44px; width:53px; height:19px; ">
  282. <caption>행추가</caption>
  283. <script type="javascript" ev:event="DOMActivate">
  284. <![CDATA[
  285. if (grd_reptinfo.valueMatrix(grd_reptinfo.row, grd_reptinfo.colRef("reptitemid")) == "")
  286. {
  287. messageBox("선택된 문항이 없습니다.", "I", "");
  288. }
  289. else
  290. {
  291. model.setFocus("grd_item");
  292. grd_item.insertRow(grd_item.row, "below", true);
  293. grd_item.valueMatrix(grd_item.row, grd_item.colRef("reptitemid")) = grd_reptinfo.valueMatrix(grd_reptinfo.row, grd_reptinfo.colRef("reptitemid"));
  294. }
  295. ]]>
  296. </script>
  297. </button>
  298. <button id="btn_preview" class="btn2_letter4" style="left:705px; top:44px; width:64px; height:19px; ">
  299. <caption>미리보기</caption>
  300. <script type="javascript" ev:event="DOMActivate">
  301. <![CDATA[
  302. setParameter("SMRTS00500_qest", getNodeListCSV(model.instances(0).selectNodes("/root/main/reptinfo/reptqestlist")) );
  303. setParameter("SMRTS00500_item", getNodeListCSV(model.instances(0).selectNodes("/root/main/reptinfo/reptitemlist")) );
  304. modalUrl("../../../mis/tistrngeducplanmngtweb/xrw/SMRTS00500_근무보고서입력.xrw", 1, 0, 0, "", "", "");
  305. ]]>
  306. </script>
  307. </button>
  308. </group>
  309. <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:1195px; height:27px; ">
  310. <button id="btn_save" class="btn4_letter2" style="left:1124px; top:3px; width:56px; height:22px; ">
  311. <caption>저장</caption>
  312. <script type="javascript" ev:event="DOMActivate">
  313. <![CDATA[
  314. var updtdata = getGridUpdateData(grd_reptinfo);
  315. var updtdatasb = getGridUpdateData(grd_item);
  316. if (updtdata == "" && updtdatasb =="") {
  317. messageBox("변경된 데이터가","I004");
  318. return;
  319. }
  320. // if(!checkKeyColumn("grd_reptinfo"))return;
  321. var retMes = messageBox("저장 하시겠습니까?", "Q999");
  322. if ( retMes != 6) {
  323. return;
  324. }
  325. var savedata = grd_reptinfo.getUpdateData();
  326. var savedataitem = grd_item.getUpdateData();
  327. model.setValue("/root/send/save/reptqestlist", savedata);
  328. model.setValue("/root/send/save/reptitemlist", savedataitem);
  329. submit("TXRTS00402");
  330. btn_search.dispatch("DOMActivate");
  331. ]]>
  332. </script>
  333. </button>
  334. <line id="line1" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  335. <button id="btn_copy" class="btn4_letter6" style="left:1005px; top:3px; width:104px; height:22px; ">
  336. <caption>전년도 Copy</caption>
  337. <script type="javascript" ev:event="DOMActivate">
  338. <![CDATA[
  339. submit("TXRTS00401");
  340. return;
  341. if (submit("TXRTS00401"))
  342. {
  343. model.setValue("/root/send/req/yy", model.getValue("/root/main/copyinfo/yy"));
  344. model.setValue("/root/send/req/apprtcdrflag", model.getValue("/root/main/copyinfo/apprtcdrflag"));
  345. btn_search.dispatch("DOMActivate");
  346. }
  347. ]]>
  348. </script>
  349. </button>
  350. </group>
  351. </xhtml:body>
  352. </xhtml:html>