SPZTP00200_프로젝트진척관리(첨부파일).xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  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. <projlist>
  11. <list>
  12. <proj>
  13. <prcscd/>
  14. <subteam/>
  15. <lrg/>
  16. <mdl/>
  17. <sml/>
  18. <srfeflag/>
  19. <scrnname/>
  20. <detailfe/>
  21. <datafile/>
  22. <dev/>
  23. <usernm/>
  24. <useyn/>
  25. </proj>
  26. </list>
  27. </projlist>
  28. <filelist>
  29. <list>
  30. <file>
  31. <seq/>
  32. <filepath/>
  33. <prcscd/>
  34. <subteam/>
  35. <filenm/>
  36. <filesize/>
  37. <filetype/>
  38. <fstrgstrid/>
  39. <fstrgstdt/>
  40. </file>
  41. </list>
  42. </filelist>
  43. </main>
  44. <send>
  45. <search>
  46. <subteam/>
  47. <lrg/>
  48. <mdl/>
  49. <srfeflag/>
  50. <scrnname/>
  51. <usernm/>
  52. <prcscd/>
  53. </search>
  54. <search_file>
  55. <prcscd/>
  56. <subteam/>
  57. <srfeflag/>
  58. </search_file>
  59. <reportid/>
  60. <filelist/>
  61. </send>
  62. <sendfile>
  63. <attach>
  64. <file/>
  65. </attach>
  66. <report>
  67. <subteam/>
  68. <prcscd/>
  69. <filenm/>
  70. </report>
  71. </sendfile>
  72. <init>
  73. <srfe>
  74. <item>
  75. <name>전체</name>
  76. <id>-</id>
  77. </item>
  78. <item>
  79. <name>화면</name>
  80. <id>화면</id>
  81. </item>
  82. <item>
  83. <name>보고서</name>
  84. <id>보고서</id>
  85. </item>
  86. <item>
  87. <name>기능</name>
  88. <id>기능</id>
  89. </item>
  90. <item>
  91. <name>오류</name>
  92. <id>오류</id>
  93. </item>
  94. <item>
  95. <name>DB변경</name>
  96. <id>DB변경</id>
  97. </item>
  98. </srfe>
  99. <subteam>
  100. <item>
  101. <name>전체</name>
  102. <id>-</id>
  103. </item>
  104. <item>
  105. <name>CMC네트워크</name>
  106. <id>CMC네트워크</id>
  107. </item>
  108. <item>
  109. <name>CRM</name>
  110. <id>CRM</id>
  111. </item>
  112. <item>
  113. <name>LIS</name>
  114. <id>LIS</id>
  115. </item>
  116. <item>
  117. <name>MIS</name>
  118. <id>MIS</id>
  119. </item>
  120. <item>
  121. <name>SWAT</name>
  122. <id>SWAT</id>
  123. </item>
  124. <item>
  125. <name>간호EMR</name>
  126. <id>간호EMR</id>
  127. </item>
  128. <item>
  129. <name>건진</name>
  130. <id>건진</id>
  131. </item>
  132. <item>
  133. <name>공통</name>
  134. <id>공통</id>
  135. </item>
  136. <item>
  137. <name>보험청구</name>
  138. <id>보험청구</id>
  139. </item>
  140. <item>
  141. <name>원무</name>
  142. <id>원무</id>
  143. </item>
  144. <item>
  145. <name>진료EMR</name>
  146. <id>진료EMR</id>
  147. </item>
  148. <item>
  149. <name>진료지원</name>
  150. <id>진료지원</id>
  151. </item>
  152. </subteam>
  153. </init>
  154. <hidden/>
  155. <cur_scrn/>
  156. <tmp/>
  157. </root>
  158. </instance>
  159. <script type="javascript" ev:event="xforms-model-construct-done">
  160. <![CDATA[
  161. fInitialize();
  162. // sub_cb.select(5);
  163. srf_cb.select(0);
  164. var prcscd = opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("prcscd"));
  165. var subteam = opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("subteam"));
  166. var usernm = opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("usernm"));
  167. // 프로젝트 리스트
  168. model.setValue("/root/send/search/prcscd",prcscd);
  169. model.setValue("/root/send/search/subteam",subteam);
  170. model.setValue("/root/send/search/usernm",usernm);
  171. fbtnSearch();
  172. // 첨부파일 리스트
  173. model.setValue("/root/send/search_file/prcscd",model.getValue("/root/send/search/prcscd"));
  174. model.setValue("/root/send/search_file/subteam",model.getValue("/root/send/search/subteam"));
  175. model.setValue("/root/cur_scrn",opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("scrnname")));
  176. submit("TRZTP00103");
  177. model.refresh();
  178. // 테스트용 테스트용 테스트용 테스트용 테스트용 테스트용 테스트용 테스트용 테스트용
  179. // 팝업과 동시에 저장을 띄우고 닫아 버리는 꽁수를 부려 보자.
  180. // if ( grd_attach.rows == 2 )
  181. // {
  182. // var idx = 1;
  183. // var filepath = model.getValue("/root/main/filelist/list/file["+idx+"]/filepath");
  184. // var filenm = model.getValue("/root/main/filelist/list/file["+idx+"]/filenm");
  185. // var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  186. // if (localfile != "") {
  187. // model.download(getActionURL("TRZTP00104")+"&filepath="+filepath,localfile);
  188. // var rtn = messageBox("파일을", "Q004");
  189. // if( rtn == 6 ) {
  190. // window.exec(localfile);
  191. // }
  192. // }
  193. // window.close();
  194. // }
  195. // 테스트용 테스트용 테스트용 테스트용 테스트용 테스트용 테스트용 테스트용 테스트용
  196. ]]>
  197. </script>
  198. <submission id="TRZTP00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/projlist/list"/>
  199. <submission id="TRZTP00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search_file" resultref="/root/main/filelist/list"/>
  200. <submission id="TRZTP00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search_file" resultref="/root/main/filelist/list"/>
  201. <submission id="TXZTP00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search_file" resultref="/root/main/filelist/list"/>
  202. <submission id="TXZTP00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/filelist" resultref="/root/main/filelist/list"/>
  203. </model>
  204. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  205. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  206. <script type="javascript">
  207. <![CDATA[
  208. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  209. function fInitialize() {
  210. model.removeNodeset("/root/main/projlist/list/proj");
  211. model.removeNodeset("/root/main/filelist/list/file");
  212. model.resetInstanceNode("/root/send");
  213. model.resetInstanceNode("/root/sendfile");
  214. model.resetInstanceNode("/root/cur_scrn");
  215. sub_cb.select(0);
  216. srf_cb.select(0);
  217. }
  218. function fbtnSearch()
  219. {
  220. submit("TRZTP00101");
  221. }
  222. function checkGridUpdate(grid)
  223. {
  224. var iData = grid.getUpdateDataXml("insert");
  225. var uData = grid.getUpdateDataXml("update");
  226. var dData = grid.getUpdateDataXml("delete");
  227. if (iData=="" && uData=="" && dData=="")
  228. return false;
  229. else
  230. return true;
  231. }
  232. ]]>
  233. </script>
  234. </xhtml:head>
  235. <xhtml:body pagewidth="925" pageheight="570">
  236. <caption id="caption2" class="tit_1" style="left:5px; top:0px; width:217px; height:13px; vertical-align:middle; ">프로젝트 진척관리(첨부파일)</caption>
  237. <caption id="caption1" class="tit_2" style="left:8px; top:393px; width:145px; height:13px; vertical-align:middle; ">첨부파일 목록 :</caption>
  238. <line id="line8" class="line_1" style="x1:3px; y1:112px; x2:923px; y2:112px; "/>
  239. <caption id="caption20" class="tit_2" style="left:9px; top:97px; width:118px; height:13px; ">프로젝트 목록</caption>
  240. <group id="group4" scroll="auto" style="left:3px; top:13px; width:920px; height:27px; ">
  241. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:920px; y2:25px; "/>
  242. <button id="btn_init" class="btn4_letter3" style="left:850px; top:3px; width:68px; height:22px; ">
  243. <caption>초기화</caption>
  244. <script type="javascript" ev:event="DOMActivate">
  245. <![CDATA[
  246. fInitialize();
  247. model.refresh();
  248. ]]>
  249. </script>
  250. </button>
  251. </group>
  252. <group id="group2" style="left:3px; top:54px; width:920px; height:35px; vertical-align:top; ">
  253. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:920px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  254. <line id="line13" style="x1:854px; y1:7px; x2:854px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  255. <caption id="caption3" class="search_name" style="left:6px; top:8px; width:86px; height:17px; ">SubTeam</caption>
  256. <select1 id="sub_cb" ref="/root/send/search/subteam" class="combo_search" appearance="minimal" style="left:95px; top:8px; width:85px; height:19px; ">
  257. <choices>
  258. <itemset nodeset="/root/init/subteam/item">
  259. <label ref="name"/>
  260. <value ref="id"/>
  261. </itemset>
  262. </choices>
  263. </select1>
  264. <caption id="caption4" class="search_name" style="left:186px; top:8px; width:66px; height:17px; ">대분류</caption>
  265. <input id="input2" ref="/root/send/search/lrg" class="input_search" style="left:255px; top:8px; width:75px; height:19px; ">
  266. <script type="javascript" ev:event="onkeypress">
  267. <![CDATA[
  268. if (event.keycode == 13)
  269. {
  270. input2.value = input2.currentText;
  271. fbtnSearch();
  272. }
  273. ]]>
  274. </script>
  275. </input>
  276. <caption id="caption5" class="search_name" style="left:336px; top:8px; width:71px; height:17px; ">중분류</caption>
  277. <input id="input1" ref="/root/send/search/mdl" class="input_search" style="left:405px; top:8px; width:70px; height:19px; ">
  278. <script type="javascript" ev:event="onkeypress">
  279. <![CDATA[
  280. if (event.keycode == 13)
  281. {
  282. input1.value = input1.currentText;
  283. fbtnSearch();
  284. }
  285. ]]>
  286. </script>
  287. </input>
  288. <caption id="caption7" class="search_name" style="left:480px; top:8px; width:54px; height:17px; ">구분</caption>
  289. <select1 id="srf_cb" ref="/root/send/search/srfeflag" class="combo_search" appearance="minimal" style="left:535px; top:8px; width:50px; height:19px; ">
  290. <choices>
  291. <itemset nodeset="/root/init/srfe/item">
  292. <label ref="name"/>
  293. <value ref="id"/>
  294. </itemset>
  295. </choices>
  296. </select1>
  297. <caption id="caption8" class="search_name" style="left:590px; top:8px; width:63px; height:17px; ">화면명</caption>
  298. <input id="input3" ref="/root/send/search/scrnname" class="input_search" style="left:655px; top:8px; width:70px; height:19px; ">
  299. <script type="javascript" ev:event="onkeypress">
  300. <![CDATA[
  301. if (event.keycode == 13)
  302. {
  303. input3.value = input3.currentText;
  304. fbtnSearch();
  305. }
  306. ]]>
  307. </script>
  308. </input>
  309. <button id="btn_search" class="btn1_letter2" style="left:860px; top:7px; width:56px; height:22px; ">
  310. <caption>조회</caption>
  311. <script type="javascript" ev:event="DOMActivate">
  312. <![CDATA[
  313. // 최초 팝업시 prcscd를 가지고 넘어 온다.(해당 ROW만 가져오기 위해 prcscd,subteam 사용)
  314. // 조회 버튼을 눌렀을 경우 prcscd를 가져오는 부분이 없으므로 초기화 해 준다.
  315. model.setValue("/root/send/search/prcscd","");
  316. model.setValue("/root/send/search_file/prcscd","");
  317. fbtnSearch();
  318. model.removeNodeset("/root/main/filelist/list/file");
  319. model.setValue("/root/cur_scrn","");
  320. model.refresh();
  321. ]]>
  322. </script>
  323. </button>
  324. <caption id="caption6" class="search_name" style="left:730px; top:8px; width:63px; height:17px; ">개발자</caption>
  325. <input id="input4" ref="/root/send/search/usernm" class="input_search" style="left:798px; top:8px; width:50px; height:19px; ">
  326. <script type="javascript" ev:event="onkeypress">
  327. <![CDATA[
  328. if (event.keycode == 13)
  329. {
  330. input4.value = input4.currentText;
  331. fbtnSearch();
  332. }
  333. ]]>
  334. </script>
  335. </input>
  336. </group>
  337. <datagrid id="grd_attach" nodeset="/root/main/filelist/list/file" caption="path^seq^prcscd^subteam^파일명^파일 크기^파일 종류^입력자^입력 일시" colwidth="100, 100, 100, 100, 526, 68, 162, 69, 67" extendlastcol="scroll" mergecellsfixedrows="bycolrec" tooltip="true" style="left:3px; top:415px; width:920px; height:150px; ">
  338. <col ref="filepath" visibility="hidden"/>
  339. <col ref="seq" visibility="hidden"/>
  340. <col ref="prcscd" visibility="hidden"/>
  341. <col ref="subteam" visibility="hidden"/>
  342. <col ref="filenm"/>
  343. <col ref="filesize"/>
  344. <col ref="filetype"/>
  345. <col ref="fstrgstrid"/>
  346. <col ref="fstrgstdt" format="yyyy-mm-dd"/>
  347. <script type="javascript" ev:event="ondblclick">
  348. <![CDATA[
  349. // alert(getActionURL("TRZTP00104"));
  350. if( grd_attach.isCell(event.target) && grd_attach.row >= grd_attach.fixedRows )
  351. {
  352. var idx = grd_attach.row;
  353. var filepath = model.getValue("/root/main/filelist/list/file["+idx+"]/filepath");
  354. var filenm = model.getValue("/root/main/filelist/list/file["+idx+"]/filenm");
  355. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  356. if (localfile != "") {
  357. model.download(getActionURL("TRZTP00104")+"&filepath="+filepath,localfile);
  358. var rtn = messageBox("파일을", "Q004");
  359. if( rtn == 6 ) {
  360. window.exec(localfile);
  361. }
  362. }
  363. }
  364. ]]>
  365. </script>
  366. </datagrid>
  367. <button id="btn_addfile" class="btn2_letter4" style="left:806px; top:390px; width:64px; height:19px; ">
  368. <caption>파일삭제</caption>
  369. <script type="javascript" ev:event="DOMActivate">
  370. <![CDATA[
  371. var selectedRows = grd_attach.selectedRows;
  372. var arr = new Array(selectedRows);
  373. if(selectedRows <= 0) {
  374. alert("삭제할 행을 선택해주세요.");
  375. return;
  376. }
  377. for ( var i = 0 ; i < arr.length ; i ++ )
  378. {
  379. arr[i] = grd_attach.selectedRow(i);
  380. }
  381. for ( var i = arr.length - 1 ; i >= 0 ; i-- )
  382. {
  383. // deleteRow(수정할 row,리프레쉬여부) , false로 설정하여 마지막에 한번에 refresh 한다.
  384. grd_attach.deleteRow(arr[i],false);
  385. }
  386. grd_attach.refresh();
  387. ]]>
  388. </script>
  389. </button>
  390. <button id="btn_upload" class="btn5_letter2" style="left:876px; top:390px; width:42px; height:19px; ">
  391. <caption>저장</caption>
  392. <script type="javascript" ev:event="DOMActivate">
  393. <![CDATA[
  394. // var curRow = grd_projlist.row;
  395. // model.setValue("/root/sendfile/report/filenm",grd_projlist.textmatrix(curRow,grd_projlist.colRef("filenm")));
  396. model.setValue("/root/send/filelist",grd_attach.getUpdateData());
  397. // if(!checkGridUpdate(grd_attach))
  398. // {
  399. // alert("저장할 자료가 존재하지 않습니다.");
  400. // return;
  401. // }
  402. if(messageBox("", "Q002")==6){
  403. if (submit("TXZTP00104")) {
  404. grd_attach.clearStatus();
  405. submit("TRZTP00103");
  406. fbtnSearch();
  407. model.refresh();
  408. }
  409. }
  410. ]]>
  411. </script>
  412. </button>
  413. <datagrid id="grd_projlist" nodeset="/root/main/projlist/list/proj" class="datagrid2" caption="PRCSCD^SUBTEAM^대분류^중분류^소분류^구분^화면명^세부기능/오류^첨부파일^개발자ID^개발자^useyn^" colwidth="0, 87, 89, 100, 94, 51, 125, 210, 34, 61, 49, 31" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" tooltip="true" style="left:3px; top:117px; width:920px; height:255px; ">
  414. <col ref="prcscd"/>
  415. <col ref="subteam"/>
  416. <col ref="lrg"/>
  417. <col ref="mdl"/>
  418. <col ref="sml"/>
  419. <col ref="srfeflag"/>
  420. <col ref="scrnname"/>
  421. <col ref="detailfe"/>
  422. <col ref="datafile"/>
  423. <col ref="dev"/>
  424. <col ref="usernm"/>
  425. <col ref="useyn" visibility="hidden"/>
  426. <script type="javascript" ev:event="ondblclick">
  427. <![CDATA[
  428. if( grd_projlist.isCell(event.target) && grd_projlist.row >= grd_projlist.fixedRows )
  429. {
  430. var curRow = grd_projlist.row;
  431. model.removeNodeset("/root/sendfile/attach/file");
  432. grd_attach.refresh(); // 첨부파일 그리드를 refresh 해줘야 한다
  433. model.setValue("/root/send/search_file/prcscd",grd_projlist.textmatrix(curRow,grd_projlist.colRef("prcscd")));
  434. model.setValue("/root/send/search_file/subteam",grd_projlist.textmatrix(curRow,grd_projlist.colRef("subteam")));
  435. model.setValue("/root/cur_scrn",grd_projlist.textmatrix(curRow,grd_projlist.colRef("scrnname")));
  436. submit("TRZTP00103");
  437. model.refresh();
  438. // // 파일 확장자 가져 오는 건데 필요 없을 듯 하다. 쓸대 없이 성능 갈아 먹을 거 같아... 너 뭐야
  439. // for(i=grd_attach.fixedRows ; i < grd_attach.rows ; i++)
  440. // {
  441. // var tmp_type = grd_attach.textmatrix(i,grd_attach.colRef("filenm"));
  442. // var type_list = tmp_type.split(".");
  443. // for (var h = 1 ; h <= type_list.length ; h++)
  444. // {
  445. // if(h == type_list.length-1)
  446. // {
  447. // alert(type_list[h]);
  448. // }
  449. // }
  450. // }
  451. }
  452. ]]>
  453. </script>
  454. </datagrid>
  455. <upload id="upload1" nodeset="/root/sendfile/attach/file" filesize="1073741824" validate="false" style="left:608px; top:390px; width:100px; height:20px; "/>
  456. <button id="button1" class="btn2_letter4" style="left:736px; top:390px; width:64px; height:19px; ">
  457. <caption>파일추가</caption>
  458. <script type="javascript" ev:event="DOMActivate">
  459. <![CDATA[
  460. // var curRow = grd_projlist.row;
  461. if(model.getValue("/root/send/search_file/prcscd") == "" | model.getValue("/root/send/search_file/subteam") == "" | model.getValue("/root/send/search_file/prcscd") == "auto")
  462. {
  463. alert("프로젝트를 선택해 주세요");
  464. return;
  465. }
  466. modal("SPZTP00300", "1", "100", "200", "SPZTP00300", "", "", "left:400; top:400; width:500; height:150; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;" , false);
  467. // 파일 추가 팝업 창을 닫은 후 첨부파일 목록 갱신
  468. submit("TRZTP00103");
  469. model.refresh();
  470. ]]>
  471. </script>
  472. </button>
  473. <caption id="caption9" ref="/root/cur_scrn" style="left:133px; top:390px; width:460px; height:20px; "/>
  474. </xhtml:body>
  475. </xhtml:html>