SMRTS01950_사랑나눔후기기준정보관리.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  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. <lattrminfo>
  11. <qestlattrmlist/>
  12. <lattrmitemlist/>
  13. </lattrminfo>
  14. <copyinfo/>
  15. </main>
  16. <hidden/>
  17. <temp>
  18. <choiitemid/>
  19. <csv>
  20. <qest/>
  21. <item/>
  22. </csv>
  23. </temp>
  24. <init/>
  25. <send>
  26. <req>
  27. <yy/>
  28. <reptinfo/>
  29. </req>
  30. <save>
  31. <qestlattrmlist/>
  32. <lattrmitemlist/>
  33. </save>
  34. </send>
  35. </root>
  36. </instance>
  37. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  38. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  39. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  40. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  41. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  42. <script type="javascript" src="../../../mis/tistrngeducplanmngtweb/js/SMRTS00400.js"/>
  43. <script type="javascript" ev:event="xforms-ready">
  44. <![CDATA[
  45. misfMsterDetailSet(grd_lattrmqest, null, "TRRTS01951", "Y");
  46. // misfMsterDetailSet(grd_item, grd_lattrmqest, "TRRTS00502", "Y");
  47. var today = getCurrentDate();
  48. var cur_yy = parseInt(today.substring(0, 4));
  49. ipt_yy.value=cur_yy;
  50. grd_lattrmqest.rowHeight(0) = 30;
  51. for (var i=0; i<=grd_lattrmqest.cols; i++)
  52. {
  53. grd_lattrmqest.mergeCol(i) = false;
  54. }
  55. grd_lattrmqest.mergeCol(grd_lattrmqest.colRef("catgrysortseq")) = true;
  56. grd_lattrmqest.mergeCol(grd_lattrmqest.colRef("catgryid")) = true;
  57. grd_lattrmqest.mergeCol(grd_lattrmqest.colRef("catgrynm")) = true;
  58. grd_lattrmqest.refresh();
  59. ]]>
  60. </script>
  61. <submission id="TRRTS00503" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req/lattrminfo" resultref="/root/main/lattrminfo"/>
  62. <submission id="TRRTS01951" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/main/lattrminfo"/>
  63. <submission id="TXRTS01951" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/main/rs"/>
  64. <submission id="TXRTS01952" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/main/rs"/>
  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. submit("TRRTS01951")
  83. if (submit("TRRTS01951"))
  84. {
  85. if (grd_lattrmqest.rows > 1)
  86. {
  87. btn_preview.disabled = false;
  88. btn_addqest.disabled = false;
  89. btn_delqest.disabled = false;
  90. btn_execl.disabled = false;
  91. btn_additem.disabled = false;
  92. btn_delitem.disabled = false;
  93. btn_save.disabled = false;
  94. grd_lattrmqest.row = 1;
  95. grd_lattrmqest.dispatch("onrowchanged");
  96. }
  97. else
  98. {
  99. btn_preview.disabled = true;
  100. btn_addqest.disabled = true;
  101. btn_delqest.disabled = true;
  102. btn_execl.disabled = true;
  103. btn_additem.disabled = true;
  104. btn_delitem.disabled = true;
  105. btn_save.disabled = true;
  106. }
  107. model.setValue("/root/temp/csv/qest", getNodeListCSV(model.instances(0).selectNodes("/root/main/lattrminfo/lattrmqestlist")) );
  108. model.setValue("/root/temp/csv/item", getNodeListCSV(model.instances(0).selectNodes("/root/main/lattrminfo/lattrmitemlist")) );
  109. misfSetReadOnlyCol(grd_lattrmqest, "catgryid", true);
  110. }
  111. ]]>
  112. </script>
  113. </button>
  114. <line id="line2" class="line_4" style="x1:1110px; y1:11px; x2:1110px; y2:36px; border-color:#ffe4bb; border-left-style:solid; "/>
  115. <input id="ipt_yy" ref="/root/send/req/yy" class="input_s_essential" format="yyyy" style="left:90px; top:14px; width:55px; height:19px; ">
  116. <script type="javascript" ev:event="xforms-value-changed">
  117. <![CDATA[
  118. btn_search.dispatch("DOMActivate");
  119. ]]>
  120. </script>
  121. </input>
  122. <caption id="cap_yy" class="search_name" style="left:5px; top:15px; width:86px; height:17px; ">년 도 :</caption>
  123. <datagrid id="grd_lattrmqest" nodeset="/root/main/lattrminfo/qestlattrmlist" caption="사용^순서^카테고리ID^카테고리명^년도^seqno^문항ID^질문내용^답변내용^기타답변^필수^순서^사용" colsep="^" colwidth="30, 35, 69, 201, 33, 58, 97, 545, 61, 30, 25, 31, 30" mergecells="bycol" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:70px; width:950px; height:650px; ">
  124. <col ref="catgryuseyn" visibility="hidden"/>
  125. <col ref="catgrysortseq" type="input" style="text-align:center; "/>
  126. <col ref="catgryid" type="input" style="text-align:center; "/>
  127. <col ref="catgrynm" type="input"/>
  128. <col ref="yy" visibility="hidden"/>
  129. <col ref="seqno" visibility="hidden"/>
  130. <col ref="itemid" visibility="hidden"/>
  131. <col ref="qestcnts" type="input"/>
  132. <col ref="answtype" type="combo">
  133. <choices>
  134. <item>
  135. <label>자유입력</label>
  136. <value>1</value>
  137. </item>
  138. <item>
  139. <label>단일선택</label>
  140. <value>2</value>
  141. </item>
  142. <item>
  143. <label>다중선택</label>
  144. <value>3</value>
  145. </item>
  146. </choices>
  147. </col>
  148. <col ref="objtivtestchoicnt" type="combo">
  149. <choices>
  150. <item>
  151. <label>N</label>
  152. <value>0</value>
  153. </item>
  154. <item>
  155. <label>Y</label>
  156. <value>1</value>
  157. </item>
  158. </choices>
  159. </col>
  160. <col ref="essnyn" type="combo">
  161. <choices>
  162. <item>
  163. <label>Y</label>
  164. <value>Y</value>
  165. </item>
  166. <item>
  167. <label>N</label>
  168. <value>N</value>
  169. </item>
  170. </choices>
  171. </col>
  172. <col ref="sortseq" type="input" visibility="visible" style="text-align:center; "/>
  173. <col checkvalue="Y,N" ref="itemuseyn" type="checkbox"/>
  174. <script type="javascript" ev:event="onrowchanged">
  175. <![CDATA[
  176. var itemid = grd_lattrmqest.valueMatrix(grd_lattrmqest.row, grd_lattrmqest.colRef("itemid"));
  177. grd_item.nodeset = "/root/main/lattrminfo/lattrmitemlist[itemid='"+itemid+"']";
  178. grd_item.refresh();
  179. if (grd_lattrmqest.valueMatrix(grd_lattrmqest.row, grd_lattrmqest.colRef("answtype")) == "1" ||
  180. grd_lattrmqest.valueMatrix(grd_lattrmqest.row, grd_lattrmqest.colRef("itemid")) == "")
  181. {
  182. btn_additem.disabled = true;
  183. btn_delitem.disabled = true;
  184. }
  185. else
  186. {
  187. btn_additem.disabled = false;
  188. btn_delitem.disabled = false;
  189. }
  190. ]]>
  191. </script>
  192. </datagrid>
  193. <button id="btn_execl" class="btn2_letter4" style="left:880px; top:44px; width:64px; height:19px; ">
  194. <caption>엑셀저장</caption>
  195. <script type="javascript" ev:event="DOMActivate">
  196. <![CDATA[
  197. alert("test");
  198. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  199. if (fileName != "") {
  200. grd_intntrnghospplanlist.saveExcel(fileName, "sheetname:sheet1;colhiddenextend:true;rowhiddenextend:false;exportfalsecols:0,0;col_1:value;");
  201. }
  202. ]]>
  203. </script>
  204. </button>
  205. <button id="btn_delqest" class="btn2_letter3" style="left:825px; top:44px; width:53px; height:19px; ">
  206. <caption>행삭제</caption>
  207. <script type="javascript" ev:event="DOMActivate">
  208. <![CDATA[
  209. misfGridIUD(grd_lattrmqest,"D");
  210. model.refresh();
  211. ]]>
  212. </script>
  213. </button>
  214. <button id="btn_addqest" class="btn2_letter3" style="left:770px; top:44px; width:53px; height:19px; ">
  215. <caption>행추가</caption>
  216. <script type="javascript" ev:event="DOMActivate">
  217. <![CDATA[
  218. var p_row = grd_lattrmqest.row;
  219. var p_rows = grd_lattrmqest.rows;
  220. grd_lattrmqest.insertRow(p_row,"below", "false", "true");
  221. if (grd_lattrmqest.row==-1){
  222. var srcRowIdx = 1;
  223. var destRowIdx = 1;
  224. grd_lattrmqest.addRow(true, false);
  225. }else{
  226. var srcRowIdx = grd_lattrmqest.row - 1;
  227. var destRowIdx = grd_lattrmqest.row;
  228. }
  229. var srcRowIdx = grd_lattrmqest.row - 1;
  230. var destRowIdx = grd_lattrmqest.row;
  231. var catgryid =grd_lattrmqest.valueMatrix(srcRowIdx, grd_lattrmqest.colRef("catgryid"));
  232. var catgrynm =grd_lattrmqest.valueMatrix(srcRowIdx, grd_lattrmqest.colRef("catgrynm"));
  233. var yy = grd_lattrmqest.valueMatrix(srcRowIdx, grd_lattrmqest.colRef("yy"));
  234. var catgrysortseq = grd_lattrmqest.valueMatrix(srcRowIdx, grd_lattrmqest.colRef("catgrysortseq"));
  235. if( p_rows== destRowIdx){
  236. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("yy")) = yy;
  237. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("catgryuseyn")) = 'Y';
  238. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("itemuseyn")) = 'Y';
  239. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("catgrysortseq")) = parseFloat(catgrysortseq)+1;
  240. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("sortseq")) = '1';
  241. grd_lattrmqest.isReadOnly(destRowIdx.row, grd_lattrmqest.colRef("catgryid")) = false;
  242. }else{
  243. grd_lattrmqest.isReadOnly(destRowIdx.row, grd_lattrmqest.colRef("catgryid")) = true;
  244. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("catgryid")) = catgryid;
  245. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("catgrynm")) = catgrynm;
  246. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("yy")) = yy;
  247. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("catgryuseyn")) = "Y";
  248. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("itemuseyn")) = 'Y';
  249. grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("catgrysortseq")) = catgrysortseq;
  250. }
  251. /* for (var i=0; i<grd_lattrmqest.cols; i++)
  252. {
  253. grd_lattrmqest.valueMatrix(destRowIdx, i) = grd_lattrmqest.valueMatrix(srcRowIdx, i);
  254. }
  255. var catgryid = grd_lattrmqest.valueMatrix(destRowIdx, grd_lattrmqest.colRef("catgryid"));
  256. grd_lattrmqest.col = grd_lattrmqest.colRef("qestcnts");*/
  257. grd_lattrmqest.dispatch("onrowchanged");
  258. grd_lattrmqest.refresh();
  259. ]]>
  260. </script>
  261. </button>
  262. <caption id="caption22" class="tit_2" style="left:5px; top:50px; width:80px; height:13px; ">문항</caption>
  263. <datagrid id="grd_item" nodeset="/root/main/lattrminfo/lattrmitemlist" caption="itemid^코드^명칭^순서^caption1" colsep="^" colwidth="0, 50, 106, 61, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:955px; top:70px; width:240px; height:650px; ">
  264. <col ref="itemid"/>
  265. <col ref="itemcd" type="input"/>
  266. <col ref="itemnm" type="input"/>
  267. <col ref="sortseq" type="input" maxlength="2"/>
  268. <col ref="useyn" visibility="hidden"/>
  269. </datagrid>
  270. <line id="line3" class="line_1" style="x1:955px; y1:65px; x2:1194px; y2:65px; "/>
  271. <caption id="caption1" class="tit_2" style="left:965px; top:50px; width:80px; height:13px; ">보기</caption>
  272. <button id="btn_delitem" class="btn2_letter3" style="left:1135px; top:44px; width:53px; height:19px; ">
  273. <caption>행삭제</caption>
  274. <script type="javascript" ev:event="DOMActivate">
  275. <![CDATA[
  276. misfGridIUD(grd_item,"D");
  277. model.refresh();
  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_lattrmqest.valueMatrix(grd_lattrmqest.row, grd_lattrmqest.colRef("itemid")) == "")
  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("itemid")) = grd_lattrmqest.valueMatrix(grd_lattrmqest.row, grd_lattrmqest.colRef("itemid"));
  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("SMRTS02050_qest", getNodeListCSV(model.instances(0).selectNodes("/root/main/lattrminfo/qestlattrmlist")) );
  303. setParameter("SMRTS02050_item", getNodeListCSV(model.instances(0).selectNodes("/root/main/lattrminfo/lattrmitemlist")) );
  304. modalUrl("../../../mis/tistrngeducplanmngtweb/xrw/SMRTS02050_사랑나눔교육후기입력.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_lattrmqest);
  315. var updtdatasb = getGridUpdateData(grd_item);
  316. if (updtdata == "" && updtdatasb =="") {
  317. messageBox("변경된 데이터가","I004");
  318. return;
  319. }
  320. // if(!checkKeyColumn("grd_lattrmqest"))return;
  321. var retMes = messageBox("저장 하시겠습니까?", "Q999");
  322. if ( retMes != 6) {
  323. return;
  324. }
  325. var savedata = grd_lattrmqest.getUpdateData();
  326. var savedataitem = grd_item.getUpdateData();
  327. model.setValue("/root/send/save/qestlattrmlist", savedata);
  328. model.setValue("/root/send/save/lattrmitemlist", savedataitem);
  329. submit("TXRTS01952");
  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("TXRTS01951");
  340. return;
  341. if (submit("TXRTS01951"))
  342. {
  343. model.setValue("/root/send/req/yy", model.getValue("/root/main/copyinfo/yy"));
  344. btn_search.dispatch("DOMActivate");
  345. }
  346. ]]>
  347. </script>
  348. </button>
  349. </group>
  350. </xhtml:body>
  351. </xhtml:html>