SPZTP01000_프로젝트진척관리(일괄수정).xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  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. <init>
  10. <title>
  11. <item>
  12. <name>대분류</name>
  13. <id>lrg</id>
  14. </item>
  15. <item>
  16. <name>중분류</name>
  17. <id>mdl</id>
  18. </item>
  19. <item>
  20. <name>소분류</name>
  21. <id>sml</id>
  22. </item>
  23. <item>
  24. <name>구분</name>
  25. <id>srfeflag</id>
  26. </item>
  27. <item>
  28. <name>화면ID</name>
  29. <id>scrnid</id>
  30. </item>
  31. <item>
  32. <name>화면명</name>
  33. <id>scrnname</id>
  34. </item>
  35. <item>
  36. <name>중요도</name>
  37. <id>insuimp</id>
  38. </item>
  39. <item>
  40. <name>세부기능/오류</name>
  41. <id>detailfe</id>
  42. </item>
  43. <item>
  44. <name>개발자ID</name>
  45. <id>dev</id>
  46. </item>
  47. <item>
  48. <name>예정시작일</name>
  49. <id>schestartdd</id>
  50. </item>
  51. <item>
  52. <name>예정완료일</name>
  53. <id>schedd</id>
  54. </item>
  55. <item>
  56. <name>추가일</name>
  57. <id>acptdd</id>
  58. </item>
  59. <item>
  60. <name>시작일</name>
  61. <id>startdd</id>
  62. </item>
  63. <item>
  64. <name>종료일</name>
  65. <id>enddd</id>
  66. </item>
  67. <item>
  68. <name>진행률</name>
  69. <id>prcsrate</id>
  70. </item>
  71. <item>
  72. <name>공정대상</name>
  73. <id>prcsyn</id>
  74. </item>
  75. <item>
  76. <name>비고</name>
  77. <id>remark</id>
  78. </item>
  79. <item>
  80. <name>기능분해1</name>
  81. <id>funt1</id>
  82. </item>
  83. <item>
  84. <name>기능분해2</name>
  85. <id>funt2</id>
  86. </item>
  87. <item>
  88. <name>기능분해3</name>
  89. <id>funt3</id>
  90. </item>
  91. <item>
  92. <name>수정필요여부</name>
  93. <id>updtneedyn</id>
  94. </item>
  95. <item>
  96. <name>과제명</name>
  97. <id>subjno</id>
  98. </item>
  99. <item>
  100. <name>사용여부</name>
  101. <id>useyn</id>
  102. </item>
  103. <item>
  104. <name>변경구분</name>
  105. <id>adchflag</id>
  106. </item>
  107. <item>
  108. <name>적용기준일</name>
  109. <id>appdd</id>
  110. </item>
  111. <item>
  112. <name>통합개발</name>
  113. <id>devflag</id>
  114. </item>
  115. <item>
  116. <name>M/D</name>
  117. <id>manday</id>
  118. </item>
  119. <item>
  120. <name>난이도</name>
  121. <id>dgrdifclt</id>
  122. </item>
  123. </title>
  124. <title2>
  125. <item>
  126. <name>시작일</name>
  127. <id>startdd</id>
  128. </item>
  129. <item>
  130. <name>종료일</name>
  131. <id>enddd</id>
  132. </item>
  133. <item>
  134. <name>진행률</name>
  135. <id>prcsrate</id>
  136. </item>
  137. </title2>
  138. <title3>
  139. <item>
  140. <name>소위원회</name>
  141. <id>reprdept</id>
  142. </item>
  143. <item>
  144. <name>화면검증완료</name>
  145. <id>scrnveriyn</id>
  146. </item>
  147. <item>
  148. <name>테스트완료</name>
  149. <id>testendyn</id>
  150. </item>
  151. <item>
  152. <name>인수위완료</name>
  153. <id>insuendyn</id>
  154. </item>
  155. <item>
  156. <name>비고</name>
  157. <id>remark</id>
  158. </item>
  159. </title3>
  160. </init>
  161. <main>
  162. <grd_projlist/>
  163. </main>
  164. <send>
  165. <title/>
  166. <content/>
  167. </send>
  168. </root>
  169. </instance>
  170. <script type="javascript" ev:event="xforms-ready">
  171. <![CDATA[
  172. // var popIndex = opener.model.getValue("/root/popIndex");
  173. //
  174. // if (popIndex == "super"){
  175. // combo1.choices.itemset.attribute("nodeset") = "/root/init/title/item";
  176. // var def = opener.grd_projlist.col;
  177. //
  178. // // 오프너의 컬럼 리스트를 받아 와서(def) 현재 팝업의 콤보 리스트와 매치 시킨다.
  179. // // def 값은 콤보 박스에 select 값으로 넘겨 준다.(콤보 인덱스는 0 부터 시작한다)
  180. // // 대분류 부터 일괄수정이 적용 되므로 그 이전의 컬럼 리스트는 제외해야 하므로 5를 빼는 것이다.
  181. // if(def < 15)
  182. // {
  183. // def = def -5;
  184. // }
  185. // else if(def < 22)
  186. // {
  187. // def = def-7;
  188. // }
  189. // else if (def < 34)
  190. // {
  191. // def = def - 14;
  192. // }
  193. // else
  194. // {
  195. // def = def -18;
  196. // }
  197. // combo1.refresh();
  198. // combo1.select(parseInt(def));
  199. // } else if (popIndex == "dev"){
  200. // combo1.choices.itemset.attribute("nodeset") = "/root/init/title2/item";
  201. // combo1.refresh();
  202. // combo1.select(0);
  203. // } else if (popIndex == "insu"){
  204. // combo1.choices.itemset.attribute("nodeset") = "/root/init/title3/item";
  205. // combo1.refresh();
  206. // combo1.select(0);
  207. // } else {
  208. // alert("error");
  209. // }
  210. // 팝업 테스트용
  211. // var popIndex = "super";
  212. // var def = "appdd";
  213. var popIndex = opener.model.getValue("/root/popIndex");
  214. var def = opener.grd_projlist.colAttribute(opener.grd_projlist.col,"ref");
  215. if(def == "schestartdd" || def == "schedd" || def == "acptdd" || def == "startdd" || def == "enddd" || def == "appdd")
  216. {
  217. input1.attribute("format") = "yyyy-mm-dd";
  218. input1.attribute("mask") = "include";
  219. }
  220. input1.refresh();
  221. if (popIndex == "super"){
  222. combo1.choices.itemset.attribute("nodeset") = "/root/init/title/item";
  223. model.setValue("/root/send/title",def);
  224. combo1.refresh();
  225. } else if (popIndex == "dev"){
  226. combo1.choices.itemset.attribute("nodeset") = "/root/init/title2/item";
  227. model.setValue("/root/send/title",def);
  228. combo1.refresh();
  229. } else if (popIndex == "insu"){
  230. combo1.choices.itemset.attribute("nodeset") = "/root/init/title3/item";
  231. model.setValue("/root/send/title",def);
  232. combo1.refresh();
  233. } else {
  234. alert("error");
  235. }
  236. // 팝업 테스트용 데이터 셋팅하기~
  237. // col element 얻어 오기
  238. // grd_projlist.colAttribute(grd_projlist.col,"ref")
  239. // grd_projlist.colAttribute(grd_projlist.col,"type")
  240. //
  241. // var def = "sml";
  242. // combo1.choices.itemset.attribute("nodeset") = "/root/init/title/item";
  243. // model.setValue("/root/send/title",def);
  244. // combo1.refresh();
  245. ]]>
  246. </script>
  247. </model>
  248. <script type="javascript" src="../../commonweb/js/common.js"/>
  249. <script type="javascript">
  250. <![CDATA[
  251. function fSetContent(){
  252. var content = model.getValue("/root/send/content");
  253. var title = model.getValue("/root/send/title");
  254. for(var i=0; i<opener.grd_projlist.selectedRows; i++)
  255. {
  256. opener.model.setValue("/root/main/projlist/list/proj[" + (opener.grd_projlist.selectedRow(i) - opener.grd_projlist.fixedRows + 1) + "]/"+title, content);
  257. }
  258. window.close();
  259. }
  260. ]]>
  261. </script>
  262. <script type="javascript" src="../../commonweb/js/common.js"/>
  263. </xhtml:head>
  264. <xhtml:body pagewidth="680" pageheight="200">
  265. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:196px; height:14px; ">프로젝트진척관리(일괄수정)</caption>
  266. <group id="group1" style="left:0px; top:55px; width:675px; height:50px; vertical-align:top; ">
  267. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:675px; height:40px; "/>
  268. <caption id="caption2" class="search_name" style="left:6px; top:8px; width:61px; height:17px; ">항목</caption>
  269. <caption id="caption3" class="search_name" style="left:201px; top:8px; width:66px; height:17px; ">내용</caption>
  270. <select1 id="combo1" ref="/root/send/title" class="combo_search" appearance="minimal" style="left:65px; top:10px; width:115px; height:19px; ">
  271. <choices>
  272. <itemset nodeset="/root/init/title/item">
  273. <label ref="name"/>
  274. <value ref="id"/>
  275. </itemset>
  276. </choices>
  277. <script type="javascript" ev:event="xforms-select">
  278. <![CDATA[
  279. // 날짜 형식의 데이터 수정시 날짜 포맷을 지정해 준다.
  280. cur_col = combo1.value;
  281. if(cur_col == "schestartdd" || cur_col == "schedd" || cur_col == "acptdd" || cur_col == "startdd" || cur_col == "enddd" || cur_col == "appdd")
  282. {
  283. input1.attribute("format") = "yyyy-mm-dd";
  284. input1.attribute("mask") = "include";
  285. }
  286. input1.refresh();
  287. ]]>
  288. </script>
  289. </select1>
  290. <input id="input1" ref="/root/send/content" style="left:255px; top:10px; width:390px; height:19px; ">
  291. <script type="javascript" ev:event="xforms-value-changed">
  292. <![CDATA[
  293. input1.value = input1.value.toUpperCase();
  294. cur_col = combo1.value;
  295. if(cur_col == "scrnveriyn" | cur_col == "insuendyn") // 화면검증완료여부,인수위 완료 여부
  296. {
  297. if(model.getValue("/root/send/content") == "Y" | model.getValue("/root/send/content") == "N" | model.getValue("/root/send/content") == "")
  298. {
  299. }
  300. else {
  301. alert("잘못된 값을 입력하셨습니다.");
  302. input1.value = "";
  303. }
  304. }
  305. else if(cur_col == "testendyn") // 테스트완료여부
  306. {
  307. if(model.getValue("/root/send/content") == "Y" | model.getValue("/root/send/content") == "N" | model.getValue("/root/send/content") == "R" | model.getValue("/root/send/content") == "")
  308. {
  309. }
  310. else {
  311. alert("잘못된 값을 입력하셨습니다.");
  312. input1.value = "";
  313. }
  314. }
  315. else if(cur_col == "acptdd" || cur_col == "enddd") // 추가일,종료일
  316. {
  317. nday = new Date() // 오늘의 날짜와 시간을 구함
  318. t_year = nday.getYear();
  319. t_mon = nday.getMonth()+1; // 0부터 시작해서 1월이다.
  320. t_day = nday.getDate();
  321. // 날짜 포맷 맞추기
  322. if(t_mon < 10)
  323. t_mon = "0" + t_mon;
  324. if(t_day < 10)
  325. t_day = "0" + t_day;
  326. if(model.getValue("/root/send/content") > t_year + "-" + t_mon + "-" + t_day)
  327. {
  328. // XPath 를 이용해서 값을 얻어와서 그때 그때 다르게 뿌려 준다.
  329. alert(model.getValue("/root/init/title/item[id = /root/send/title]/name") + "은 현재날짜 보다 클 수 없습니다.");
  330. input1.value = "";
  331. }
  332. }
  333. else if(cur_col == "appdd") // 적용 기준일
  334. {
  335. if(model.getValue("/root/send/content") == "2008-10-01" || model.getValue("/root/send/content") == "2009-01-01" ||
  336. model.getValue("/root/send/content") == "2009-03-01" || model.getValue("/root/send/content") == "2009-03-23"|| model.getValue("/root/send/content") == "2009-05-01")
  337. {
  338. }
  339. else
  340. {
  341. alert("적용 기준일은 2008-10-01, 2009-01-01, 2009-03-01, 2008-03-23, 2009-05-01 중 하나입니다.");
  342. input1.value = "";
  343. }
  344. }
  345. ]]>
  346. </script>
  347. <script type="javascript" ev:event="onkeypress">
  348. <![CDATA[
  349. if (event.keycode == 13)
  350. {
  351. input1.value = input1.currentText;
  352. fSetContent();
  353. }
  354. ]]>
  355. </script>
  356. </input>
  357. </group>
  358. <button id="button1" class="btn2_letter4" disable.background-image="../../../com/commonweb/images/dis_btn2_letter4.gif" style="left:610px; top:35px; width:64px; height:19px; background-image:../../../com/commonweb/images/btn2_letter4.gif; ">
  359. <caption>일괄수정</caption>
  360. <script type="javascript" ev:event="DOMActivate">
  361. <![CDATA[
  362. fSetContent();
  363. ]]>
  364. </script>
  365. </button>
  366. </xhtml:body>
  367. </xhtml:html>