SMMQP02600_평가마스터관리.xrw 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  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. <masterinfo>
  11. <info>
  12. <irowno/>
  13. <valunm/>
  14. <fromdd/>
  15. <todd/>
  16. <valuno/>
  17. <histseq/>
  18. <valuflag/>
  19. <refseq/>
  20. <check/>
  21. <status/>
  22. </info>
  23. </masterinfo>
  24. <condition>
  25. <valuflag>1</valuflag>
  26. </condition>
  27. <sortdata>
  28. <sort1>1</sort1>
  29. <cond1>-</cond1>
  30. <icond1>0</icond1>
  31. <sort2>2</sort2>
  32. <cond2>-</cond2>
  33. <icond2>0</icond2>
  34. <sort3>3</sort3>
  35. <cond3>-</cond3>
  36. <icond3>0</icond3>
  37. </sortdata>
  38. </main>
  39. <send>
  40. <reqdata>
  41. </reqdata>
  42. <savedata>
  43. </savedata>
  44. </send>
  45. <trgdata/>
  46. <srcdata/>
  47. <temp>
  48. <getdata>
  49. <grdfocus/>
  50. <poolsize>1</poolsize>
  51. <pool>
  52. <cd/>
  53. </pool>
  54. <endVal/>
  55. </getdata>
  56. <size/>
  57. <info>
  58. <irowno/>
  59. <valunm/>
  60. <fromdd/>
  61. <todd/>
  62. <valuno/>
  63. <histseq/>
  64. <valuflag/>
  65. <refseq/>
  66. <check/>
  67. <status/>
  68. </info>
  69. </temp>
  70. </root>
  71. </instance>
  72. <script type="javascript" ev:event="xforms-model-construct-done">
  73. <![CDATA[
  74. if( !isNull(getOpenerUID()) ){
  75. srchexclsYN = opener.javascript.getParameter("srchexcls");
  76. srchdropYN = opener.javascript.getParameter("srchdrop");
  77. if( srchexclsYN == "Y" ){
  78. model.setValue("/root/main/condition/valuflag", "3");
  79. var sRow = opener.javascript.getParameter("lastrowcnt");
  80. model.setValue("/root/temp/getdata/grdfocus",sRow );
  81. }
  82. if( srchdropYN == "Y" ){
  83. model.setValue("/root/main/condition/valuflag", "2");
  84. var sRow = opener.javascript.getParameter("lastrowcnt");
  85. model.setValue("/root/temp/getdata/grdfocus",sRow );
  86. }
  87. }
  88. model.removeNodeset("/root/send");
  89. model.makeValue("/root/send/reqdata/valuflag", model.getValue("/root/main/condition/valuflag"));
  90. submit("TRMQP02601");
  91. if( srchexclsYN == "Y" ){
  92. grd_masterinfo.explorerbar = "sortshow";
  93. cap_title.attribute("text") = "Exclusion 사유 조회";
  94. cap_smalltitle.visible = false;
  95. btn_sel.visible = true;
  96. btn_save.visible = false;
  97. //grd_masterinfo.caption="선택^내용^적용일자^종료일자^caption1^caption2^caption3^caption4";
  98. grd_masterinfo.attribute("rowheader") = "seq";
  99. grd_masterinfo.colhidden(1) = false;
  100. grd_masterinfo.colhidden(2) = true;
  101. grd_masterinfo.coltype(3) = "output";
  102. grd_masterinfo.colWidth(3) = 400;
  103. grd_masterinfo.colhidden(4) = true;
  104. grd_masterinfo.colhidden(5) = true;
  105. grd_masterinfo.attribute("top") = "12px";
  106. grd_masterinfo.attribute("width") = "490px";
  107. grd_masterinfo.attribute("height") = "423px";
  108. roundrect1.attribute("width") = 0;
  109. btn_srch.attribute("left") = 0;
  110. line27.attribute("x1") = 0;
  111. line27.attribute("x2") = 0;
  112. btn_add.attribute("left") = 0;
  113. btn_del.attribute("left") = 0;
  114. btn_excel.attribute("left") = 0;
  115. line7.attribute("x2") = "490px";
  116. line8.attribute("x2") = "490px";
  117. line8.attribute("y1") = "436px";
  118. line8.attribute("y2") = "436px";
  119. btn_sel.attribute("left") = "375px";
  120. btn_save.attribute("left") = "375px";
  121. btn_close.attribute("left") = "433px";
  122. grd_masterinfo.coltype(4) = "output";
  123. grd_masterinfo.coltype(5) = "output";
  124. grp_biz.attribute("width") = 490;
  125. grp_biz.attribute("height") = 440;
  126. grp_btn.attribute("top") = 455;
  127. grp_btn.attribute("width") = 490;
  128. grp_tle.attribute("width") = 490;
  129. //btn_save2.visible = true;
  130. btn_upviewmode.attribute("top") = 0;
  131. btn_upviewmode2.attribute("top") = 0;
  132. btn_downviewmode.attribute("top") = 0;
  133. btn_downviewmode2.attribute("top") = 0;
  134. btn_upviewmode2.attribute("left") = 0;
  135. btn_upviewmode.attribute("left") = 0;
  136. btn_downviewmode.attribute("left") = 0;
  137. btn_downviewmode2.attribute("left") = 0;
  138. btn_upviewmode.visible = false;
  139. btn_upviewmode2.visible = false;
  140. btn_downviewmode.visible = false;
  141. btn_downviewmode2.visible = false;
  142. window.width = 516;
  143. window.height = 537;
  144. grd_masterinfo.setSeqRowHeader(1);
  145. }
  146. //drop cp별 관리를 위한 화면 처리로직 추가. 2008.06.20 LWS
  147. else if( srchdropYN == "Y" ){
  148. grd_masterinfo.explorerbar = "sortshow";
  149. cap_title.attribute("text") = "Drop 사유 조회";
  150. cap_smalltitle.visible = false;
  151. btn_sel.visible = true;
  152. btn_save.visible = false;
  153. grd_masterinfo.attribute("rowheader") = "seq";
  154. grd_masterinfo.colhidden(1) = false;
  155. grd_masterinfo.colhidden(2) = true;
  156. grd_masterinfo.coltype(3) = "output";
  157. grd_masterinfo.colWidth(3) = 400;
  158. grd_masterinfo.colhidden(4) = true;
  159. grd_masterinfo.colhidden(5) = true;
  160. grd_masterinfo.attribute("top") = "12px";
  161. grd_masterinfo.attribute("width") = "490px";
  162. grd_masterinfo.attribute("height") = "423px";
  163. roundrect1.attribute("width") = 0;
  164. btn_srch.attribute("left") = 0;
  165. line27.attribute("x1") = 0;
  166. line27.attribute("x2") = 0;
  167. btn_add.attribute("left") = 0;
  168. btn_del.attribute("left") = 0;
  169. btn_excel.attribute("left") = 0;
  170. line7.attribute("x2") = "490px";
  171. line8.attribute("x2") = "490px";
  172. line8.attribute("y1") = "436px";
  173. line8.attribute("y2") = "436px";
  174. btn_sel.attribute("left") = "375px";
  175. btn_save.attribute("left") = "375px";
  176. btn_close.attribute("left") = "433px";
  177. grd_masterinfo.coltype(4) = "output";
  178. grd_masterinfo.coltype(5) = "output";
  179. grp_biz.attribute("width") = 490;
  180. grp_biz.attribute("height") = 440;
  181. grp_btn.attribute("top") = 455;
  182. grp_btn.attribute("width") = 490;
  183. grp_tle.attribute("width") = 490;
  184. //btn_save2.visible = true;
  185. btn_upviewmode.attribute("top") = 0;
  186. btn_upviewmode2.attribute("top") = 0;
  187. btn_downviewmode.attribute("top") = 0;
  188. btn_downviewmode2.attribute("top") = 0;
  189. btn_upviewmode2.attribute("left") = 0;
  190. btn_upviewmode.attribute("left") = 0;
  191. btn_downviewmode.attribute("left") = 0;
  192. btn_downviewmode2.attribute("left") = 0;
  193. btn_upviewmode.visible = false;
  194. btn_upviewmode2.visible = false;
  195. btn_downviewmode.visible = false;
  196. btn_downviewmode2.visible = false;
  197. window.width = 516;
  198. window.height = 537;
  199. grd_masterinfo.setSeqRowHeader(1);
  200. }
  201. else{
  202. var gnrObj = getOpenWindow("SMMQP00600");
  203. if( gnrObj != null ){
  204. var openmasterYN = opener.javascript.getParameter("openmaster");
  205. if( isNull(openmasterYN) ){
  206. btn_save.attribute("left") = "998px";
  207. btn_close.visible = true;
  208. }
  209. grd_masterinfo.colhidden(1) = true;
  210. }
  211. }
  212. ]]>
  213. </script>
  214. <submission id="TRMQP02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/masterinfo"/>
  215. <submission id="TXMQP02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/masterinfo"/>
  216. <!-- <submission id="TRMMP02102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/antibionsgbrcdlist"/> -->
  217. </model>
  218. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  219. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  220. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  221. <script type="javascript" src="../../../emr/termmngtweb/js/MRTCommon.js"/>
  222. <script type="javascript">
  223. <![CDATA[
  224. var srchexclsYN = "";
  225. var srchdropYN = "";
  226. var srcNode = "/root/main/masterinfo/info"; //["+iRow+"]
  227. // 중복 체크를 한 후 ER 로 데이터를 전달한다.
  228. function fSetOpenerValue( iRow ) {
  229. var bool = "false";
  230. var iCnt = parseInt(model.getValue("/root/temp/getdata/poolsize"));
  231. var selCd = model.getValue("/root/main/masterinfo/info["+ iRow + "]/valuno");
  232. if(iCnt != 1){
  233. for(var i=1; i<=iCnt; i++) {
  234. if(selCd == model.getValue("/root/temp/getdata/pool/cd[" + i + "]")){
  235. bool = "ture";
  236. return;
  237. }
  238. }
  239. }
  240. if(bool == "false"){
  241. var sRow = model.getValue("/root/temp/getdata/grdfocus");
  242. if(sRow == ""){
  243. sRow = "0";
  244. model.setValue("/root/temp/getdata/endVal" , "E");
  245. }
  246. sRow = parseInt(sRow) + 1;
  247. var selCd = model.getValue("/root/main/masterinfo/info[" + iRow + "]/valuno");
  248. var selSeq = model.getValue("/root/main/masterinfo/info[" + iRow + "]/histseq");
  249. var selNM = model.getValue("/root/main/masterinfo/info[" + iRow + "]/valunm");
  250. if(model.getValue("/root/main/condition/valuflag") == "3") {
  251. opener.grd_exclusion.addRow();
  252. opener.model.makeValue("/root/main/exclusion/exclist[" + sRow + "]/valuno", selCd);
  253. opener.model.makeValue("/root/main/exclusion/exclist[" + sRow + "]/histseq", selSeq);
  254. opener.model.makeValue("/root/main/exclusion/exclist[" + sRow + "]/valunm", selNM);
  255. opener.model.makeValue("/root/main/exclusion/exclist[" + sRow + "]/m", "i");
  256. opener.model.makeValue("/root/main/exclusion/exclist[" + sRow + "]/flag", "E00");
  257. } else if(model.getValue("/root/main/condition/valuflag") == "2") {
  258. opener.grd_drop.addRow();
  259. opener.model.makeValue("/root/main/dropinfo/droplist[" + sRow + "]/valuno", selCd);
  260. opener.model.makeValue("/root/main/dropinfo/droplist[" + sRow + "]/histseq", selSeq);
  261. opener.model.makeValue("/root/main/dropinfo/droplist[" + sRow + "]/valunm", selNM);
  262. opener.model.makeValue("/root/main/dropinfo/droplist[" + sRow + "]/m", "i");
  263. opener.model.makeValue("/root/main/dropinfo/droplist[" + sRow + "]/flag", "D00");
  264. }
  265. //opener.grd_diag.rowStatus(sRow)= 1;
  266. //opener.grd_diag.rebuild();
  267. model.setValue("/root/temp/getdata/grdfocus", sRow);
  268. model.makeValue("/root/temp/getdata/pool/cd[" + iCnt + "]", selCd);
  269. iCnt = parseInt(iCnt)+1;
  270. model.setValue("/root/temp/getdata/poolsize", iCnt);
  271. }
  272. }
  273. /*=====================================================================================
  274. @desc : drop/평가/exclusion 추가
  275. ======================================================================================*/
  276. function fAddCnts(){
  277. grd_masterinfo.addRow();
  278. var curCnt = grd_masterinfo.rows - grd_masterinfo.fixedRows;
  279. model.setValue("/root/main/masterinfo/info[" + curCnt + "]/fromdd", getCurrentDate() );
  280. model.setValue("/root/main/masterinfo/info[" + curCnt + "]/todd", '99991231' );
  281. model.setValue("/root/main/masterinfo/info[" + curCnt + "]/valuflag", model.getValue("/root/main/condition/valuflag") );
  282. model.setValue("/root/main/masterinfo/info[" + curCnt + "]/status", "i" );
  283. //opener check 추가 by 손주연 2008-01-04
  284. grd_masterinfo.row = curCnt;
  285. grd_masterinfo.col = 3
  286. grd_masterinfo.editCell();
  287. //model.refresh();
  288. //손주연 수정 종료
  289. }
  290. /*=====================================================================================
  291. @desc : 행 옮기기
  292. ======================================================================================*/
  293. function fMoveRow( flag, no ){
  294. if( grd_masterinfo.row < 1 ){
  295. messageBox("이동할 행을", "C002");
  296. return;
  297. }
  298. if(grd_masterinfo.selectedRows > 1){
  299. messageBox("여러 행을 이동", "E001");
  300. return;
  301. }
  302. var iRow = grd_masterinfo.row;
  303. var trgRow = 0;
  304. model.removenode("/root/temp/info");
  305. model.makeNode("/root/temp/info");
  306. model.copyNode("/root/temp/info", srcNode + "[" + iRow + "]");
  307. if( flag == "T" ){ //"위로"
  308. if( iRow == 1 ){
  309. messageBox("이동", "E001");
  310. return;
  311. }
  312. if(no == 1){
  313. model.copyNode(srcNode + "["+ iRow +"]", srcNode + "["+ (iRow-1) +"]");
  314. model.copyNode(srcNode + "["+ (iRow-1) +"]" , "/root/temp/info");
  315. model.setValue(srcNode + "[" + (iRow-1) + "]/irowno" , iRow-1);
  316. model.setValue(srcNode + "[" + (iRow-1) + "]/refseq" , iRow-1);
  317. if( model.getValue(srcNode + "[" + (iRow-1) + "]/status") != "i" ){
  318. model.setValue(srcNode + "[" + (iRow-1) + "]/status" , "u");
  319. }
  320. model.setValue(srcNode + "[" + iRow + "]/irowno" , iRow);
  321. model.setValue(srcNode + "[" + iRow + "]/refseq" , iRow);
  322. if( model.getValue(srcNode + "[" + iRow + "]/status") != "i" ){
  323. model.setValue(srcNode + "[" + iRow + "]/status" , "u");
  324. }
  325. grd_masterinfo.select(iRow-1, 1) = true;
  326. grd_masterinfo.row = iRow-1;
  327. }else{
  328. //trgRow = 1;
  329. for( var i=1; i<=(iRow-1); i++){
  330. model.setValue(srcNode + "[" + i + "]/irowno" , (i+1));
  331. model.setValue(srcNode + "[" + i + "]/refseq" , (i+1));
  332. if( model.getValue(srcNode + "[" + i + "]/status") != "i" ){
  333. model.setValue(srcNode + "[" + i + "]/status" , "u");
  334. }
  335. }
  336. model.removenode(srcNode + "[" + iRow + "]");
  337. var pNode = instance1.selectSingleNode("/root/main/masterinfo");
  338. var destNode = instance1.selectSingleNode(srcNode + "[" + 1 + "]");
  339. var copyNode = instance1.selectSingleNode("/root/temp/info");
  340. pNode.insertBefore(copyNode, destNode);
  341. model.setValue(srcNode + "[" + 1 + "]/irowno" , 1);
  342. model.setValue(srcNode + "[" + 1 + "]/refseq" , 1);
  343. if( model.getValue(srcNode + "[" + 1 + "]/status") != "i" ){
  344. model.setValue(srcNode + "[" + 1 + "]/status" , "u");
  345. }
  346. grd_masterinfo.select(1, 1) = true;
  347. grd_masterinfo.row = 1;
  348. }
  349. }else if( flag == "B"){ //"아래로"
  350. if( iRow == grd_masterinfo.rows-1 ){
  351. messageBox("이동", "E001");
  352. return;
  353. }
  354. if(no == 1){
  355. model.copyNode(srcNode + "["+ iRow +"]" , srcNode + "["+ (iRow+1) +"]");
  356. model.copyNode(srcNode + "["+ (iRow+1) +"]", "/root/temp/info");
  357. model.setValue(srcNode + "[" + iRow + "]/irowno" , iRow);
  358. model.setValue(srcNode + "[" + iRow + "]/refseq" , iRow);
  359. if( model.getValue(srcNode + "[" + iRow + "]/status") != "i" ){
  360. model.setValue(srcNode + "[" + iRow + "]/status" , "u");
  361. }
  362. model.setValue(srcNode + "[" + (iRow+1) + "]/irowno" , iRow+1);
  363. model.setValue(srcNode + "[" + (iRow+1) + "]/refseq" , iRow+1);
  364. if( model.getValue(srcNode + "[" + (iRow+1) + "]/status") != "i" ){
  365. model.setValue(srcNode + "[" + (iRow+1) + "]/status" , "u");
  366. }
  367. grd_masterinfo.select(iRow+1, 1) = true;
  368. grd_masterinfo.row = iRow+1;
  369. }else{
  370. trgRow = grd_masterinfo.rows-1;
  371. for( var i=(iRow+1); i<=trgRow; i++){
  372. model.setValue(srcNode + "[" + i + "]/irowno" , (i-1));
  373. model.setValue(srcNode + "[" + i + "]/refseq" , (i-1));
  374. if( model.getValue(srcNode + "[" + i + "]/status") != "i" ){
  375. model.setValue(srcNode + "[" + i + "]/status" , "u");
  376. }
  377. }
  378. var pNode = instance1.selectSingleNode("/root/main/masterinfo");
  379. var destNode = instance1.selectSingleNode(srcNode + "[" + (trgRow) + "]");
  380. var copyNode = instance1.selectSingleNode("/root/temp/info");
  381. pNode.insertAfter(copyNode, destNode);
  382. model.removenode(srcNode + "[" + iRow + "]");
  383. model.setValue(srcNode + "[" + trgRow + "]/irowno" , trgRow);
  384. model.setValue(srcNode + "[" + trgRow + "]/refseq" , trgRow);
  385. if( model.getValue(srcNode + "[" + trgRow + "]/status") != "i" ){
  386. model.setValue(srcNode + "[" + trgRow + "]/status" , "u");
  387. }
  388. grd_masterinfo.select(trgRow, 1) = true;
  389. grd_masterinfo.row = trgRow;
  390. }
  391. }
  392. grd_masterinfo.refresh();
  393. fSettingStatus();
  394. //btn_save2.disabled = false;
  395. }
  396. /*=====================================================================================
  397. @desc : rowstatus 재설정
  398. ======================================================================================*/
  399. function fSettingStatus(){
  400. for( var i=1; i<grd_masterinfo.rows; i++ ){
  401. var iStatus = model.getValue(srcNode + "[" + i + "]/status");
  402. if( iStatus == "i" ){
  403. grd_masterinfo.rowstatus(i) = 1;
  404. }else if( iStatus == "u" ){
  405. grd_masterinfo.rowstatus(i) = 2;
  406. }else if( iStatus == "d" ){
  407. grd_masterinfo.rowstatus(i) = 4;
  408. }
  409. }
  410. }
  411. ]]>
  412. </script>
  413. </xhtml:head>
  414. <xhtml:body pagewidth="1073" pageheight="765" guideline="1,1075;" idprefix="import" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  415. <group id="grp_tle" style="left:0px; top:0px; width:1055px; height:13px; ">
  416. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:180px; height:14px; ">Drop/Exclusion 관리</caption>
  417. </group>
  418. <group id="grp_btn" style="left:0px; top:738px; width:1055px; height:27px; ">
  419. <button id="btn_sel" class="btn4_letter2" visibility="hidden" style="left:882px; top:3px; width:56px; height:22px; ">
  420. <caption>선택</caption>
  421. <script type="javascript" ev:event="DOMActivate">
  422. <![CDATA[
  423. var rowCnt = grd_masterinfo.rows;
  424. for(var i=1; i<rowCnt; i++){
  425. var bool = grd_masterinfo.valueMatrix(i,1);
  426. if(bool == "true"){
  427. fSetOpenerValue( i );
  428. }
  429. if(model.getValue("/root/temp/getdata/endVal") == "E")
  430. window.close();
  431. }
  432. ]]>
  433. </script>
  434. </button>
  435. <button id="btn_save" class="btn4_letter2" style="left:940px; top:3px; width:56px; height:22px; ">
  436. <caption>저장</caption>
  437. <script type="javascript" ev:event="DOMActivate">
  438. <![CDATA[
  439. model.removeNodeset("/root/send");
  440. // model.makeNode("/root/send/savedata/info");
  441. // var curCnt = grd_masterinfo.rows - grd_masterinfo.fixedRows;//1부터 시작
  442. // for( var idx = 1 ; idx <= curCnt ; idx++ ){
  443. // model.setValue("/root/main/masterinfo/info["+ idx + "]/refseq", idx);
  444. // }
  445. // model.copyNode("/root/send/savedata", "/root/main/masterinfo");
  446. model.makeValue("/root/send/savedata/list", grd_masterinfo.getUpdateData());
  447. submit("TXMQP02601");
  448. ]]>
  449. </script>
  450. </button>
  451. <button id="btn_close" class="btn4_letter2" style="left:998px; top:3px; width:56px; height:267px; ">
  452. <caption>닫기</caption>
  453. <script type="javascript" ev:event="DOMActivate">
  454. <![CDATA[
  455. window.close();
  456. ]]>
  457. </script>
  458. </button>
  459. </group>
  460. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1055px; height:727px; ">
  461. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:35px; width:1054px; height:35px; "/>
  462. <line id="line7" class="line_1" style="x1:0px; y1:95px; x2:1055px; y2:95px; "/>
  463. <line id="line8" class="line_3" style="x1:0px; y1:725px; x2:1055px; y2:725px; "/>
  464. <line id="line27" class="line_4" style="x1:970px; y1:42px; x2:970px; y2:64px; "/>
  465. <caption id="cap_smalltitle" class="tit_2" style="left:5px; top:15px; width:226px; height:15px; ">Drop/Exclusion 관리</caption>
  466. <select1 id="rdo_flag" ref="/root/main/condition/valuflag" appearance="full" cellspacing="15" cols="3" overflow="visible" style="left:80px; top:46px; width:265px; height:13px; border-style:none; ">
  467. <choices>
  468. <item>
  469. <label>Drop사유</label>
  470. <value>2</value>
  471. </item>
  472. <item>
  473. <label>Exclusion사유</label>
  474. <value>3</value>
  475. </item>
  476. </choices>
  477. <script type="javascript" ev:event="xforms-value-changed">
  478. <![CDATA[
  479. model.removeNodeset("/root/send");
  480. model.makeValue("/root/send/reqdata/valuflag", model.getValue("/root/main/condition/valuflag"));
  481. submit("TRMQP02601");
  482. ]]>
  483. </script>
  484. </select1>
  485. <caption id="cap_flag" class="search_name" style="left:10px; top:45px; width:75px; height:17px; ">구분 :</caption>
  486. <button id="btn_srch" class="btn1_letter2" style="left:985px; top:42px; width:56px; height:22px; ">
  487. <caption>조회</caption>
  488. <script type="javascript" ev:event="DOMActivate">
  489. <![CDATA[
  490. model.removeNodeset("/root/send");
  491. model.makeValue("/root/send/reqdata/valuflag", model.getValue("/root/main/condition/valuflag"));
  492. submit("TRMQP02601");
  493. ]]>
  494. </script>
  495. </button>
  496. <button id="btn_add" class="btn2_letter2" style="left:923px; top:74px; width:42px; height:19px; ">
  497. <caption>추가</caption>
  498. <script type="javascript" ev:event="DOMActivate">
  499. <![CDATA[
  500. fAddCnts();
  501. /*
  502. grd_masterinfo.addRow();
  503. var curCnt = grd_masterinfo.rows - grd_masterinfo.fixedRows;
  504. model.setValue("/root/main/masterinfo/info[" + curCnt + "]/fromdd", getCurrentDate() );
  505. model.setValue("/root/main/masterinfo/info[" + curCnt + "]/todd", '99991231' );
  506. model.setValue("/root/main/masterinfo/info[" + curCnt + "]/valuflag", model.getValue("/root/main/condition/valuflag") );
  507. model.refresh();*/
  508. ]]>
  509. </script>
  510. </button>
  511. <button id="btn_del" class="btn2_letter2" style="left:968px; top:74px; width:42px; height:19px; ">
  512. <caption>삭제</caption>
  513. <script type="javascript" ev:event="DOMActivate">
  514. <![CDATA[
  515. //var iRow = grd_masterinfo.row - grd_masterinfo.fixedRows + 1;
  516. var iSelectedRows = grd_masterinfo.selectedRows;
  517. var iRow = 0;
  518. if(iSelectedRows < 1){
  519. return;
  520. }
  521. //2008.07.25 선택한 여려건 삭제 처리(JJE)
  522. for( var i=iSelectedRows-1; i>=0; i-- ){
  523. iRow = grd_masterinfo.selectedRow(i);
  524. var statusNode = instance1.selectSingleNode( srcNode + "[" + iRow + "]/status" );
  525. var status = statusNode.text;
  526. if( status == "i" ){
  527. //grd_masterinfo.deleteRow(iRow); => 바로 삭제 시, selectedRow(i) 잘못 잡힘
  528. model.removenode(srcNode + "[" + iRow + "]");
  529. }else if(status == "d" ){
  530. model.setValue(statusNode, "-");
  531. grd_masterinfo.rowStatus(iRow) = 0;
  532. }else{
  533. model.setValue(statusNode, "d");
  534. model.setValue(srcNode + "[" + iRow + "]/todd", getCurrentDate());
  535. grd_masterinfo.rowStatus(iRow) = 4;
  536. }
  537. }
  538. grd_masterinfo.refresh();
  539. fSettingStatus();
  540. ]]>
  541. </script>
  542. </button>
  543. <button id="btn_excel" class="btn2_letter2" style="left:1013px; top:74px; width:42px; height:19px; ">
  544. <caption>엑셀</caption>
  545. <script type="javascript" ev:event="DOMActivate">
  546. <![CDATA[
  547. var fileName = window.fileDialog("save", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  548. if (fileName != ""){
  549. grd_masterinfo.saveExcel(fileName, "SheetName:sheet1;exportfalsecols:0,6,7,8;", true, true, "", "", false);
  550. }
  551. ]]>
  552. </script>
  553. </button>
  554. <datagrid id="grd_masterinfo" nodeset="/root/main/masterinfo/info" dragmode="true" dropmode="true" autoresize="true" caption="선택^No,^내용^적용일자^종료일자^caption1^caption2^caption3^caption4^caption5^caption6" colsep="^" colwidth="50, 50, 760, 100, 100, 100, 100, 100, 100, 100, 100" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:99px; width:1055px; height:625px; ">
  555. <col ref="check" type="checkbox"/>
  556. <col ref="irowno" style="text-align:center; "/>
  557. <col ref="valunm" type="input" style="text-align:left; vertical-align:middle; "/>
  558. <col ref="fromdd" type="inputdate" style="text-align:center; "/>
  559. <col ref="todd" type="inputdate" style="text-align:center; "/>
  560. <col ref="valuno" visibility="hidden"/>
  561. <col ref="histseq" visibility="hidden"/>
  562. <col ref="valuflag" visibility="hidden"/>
  563. <col ref="refseq" visibility="hidden"/>
  564. <col ref="check" visibility="hidden"/>
  565. <col ref="status" visibility="hidden"/>
  566. <script type="javascript" ev:event="ondrop">
  567. <![CDATA[
  568. //Drop 등록, Exclusion 선택을 위해 화면이 열릴때에도, 이동 가능해야 함 (20080717 요구사항)
  569. if( srchexclsYN == "Y" ) return ;
  570. if( srchdropYN == "Y" ) return ;
  571. var trgCnt = grd_masterinfo.mouseRow;
  572. if( trgCnt < 0){
  573. trgCnt = grd_masterinfo.rows - grd_masterinfo.fixedRows;
  574. }
  575. if( trgCnt == 0){
  576. trgCnt = 1;
  577. }
  578. var srcCnt = grd_masterinfo.row;
  579. var newCnt;
  580. var trgNode = "/root/main/masterinfo/info["+trgCnt+"]";
  581. var srcNode = "/root/main/masterinfo/info["+srcCnt+"]";
  582. var srcStatus = grd_masterinfo.rowStatus(srcCnt);
  583. var trgStatus = grd_masterinfo.rowStatus(trgCnt);
  584. if ( event.drag == "grd_masterinfo") {
  585. grd_masterinfo.select( grd_masterinfo.mouseRow, 1, grd_masterinfo.mouseRow, 8 ) = true;
  586. model.removeNodeset("/root/trgdata");
  587. model.makeNode("/root/trgdata/info");
  588. if(srcCnt > 0 && trgCnt > 0 ){
  589. for(idx = 1 ; idx <= (grd_masterinfo.rows - grd_masterinfo.fixedRows) ; idx++){
  590. if( grd_masterinfo.rowStatus(idx) != 0 ){
  591. return;
  592. }
  593. }
  594. if( trgCnt == srcCnt){//자기자신일경우..
  595. return;
  596. }else{
  597. model.copyNode(" /root/trgdata/info", trgNode);
  598. grd_masterinfo.insertRow(trgCnt, "above",false);
  599. model.copyNode( trgNode, "/root/srcdata/info" );
  600. //model.copyNode( srcNode, " /root/trgdata/info");
  601. if( trgCnt < srcCnt ) srcCnt++;//아래에서 위로 이동할때 위쪽에 행이 하나 추가되었으므로 삭제할 행이 증가된상태이다
  602. if( trgCnt > srcCnt ) srcCnt--;
  603. grd_masterinfo.deleteRow(srcCnt, false);
  604. grd_masterinfo.refresh();
  605. }
  606. grd_masterinfo.refresh();
  607. }
  608. //refseq update하러 간다.
  609. model.removeNodeset("/root/send");
  610. model.makeNode("/root/send/savedata/info");
  611. var curCnt = grd_masterinfo.rows - grd_masterinfo.fixedRows;//1부터 시작
  612. for( var idx = 1 ; idx <= curCnt ; idx++ ){
  613. model.setValue("/root/main/masterinfo/info["+ idx + "]/refseq", idx);
  614. }
  615. model.copyNode("/root/send/savedata", "/root/main/masterinfo");
  616. submit("TXMQP02601");
  617. }
  618. ]]>
  619. </script>
  620. <script type="javascript" ev:event="ondragover">
  621. <![CDATA[
  622. //2008-01-17 손주연 수정 시작
  623. if( srchexclsYN == "Y" ) return;
  624. //2008-01-17 손주연 수정 종료
  625. if( srchdropYN == "Y" ) return ;
  626. if ( event.drag == "grd_masterinfo") {
  627. grd_masterinfo.select( grd_masterinfo.mouseRow, 1, grd_masterinfo.mouseRow, 8 ) = true;
  628. }
  629. ]]>
  630. </script>
  631. <script type="javascript" ev:event="ondragstart">
  632. <![CDATA[
  633. if ( event.drag == "grd_masterinfo") {
  634. model.removeNodeset("/root/srcdata");
  635. model.makeNode("/root/srcdata/info");
  636. //event.dropData = grd_masterinfo.textMatrix( grd_masterinfo.row, 1 );
  637. var curCnt = grd_masterinfo.row;
  638. if(curCnt > 0){
  639. model.copyNode("/root/srcdata/info", "/root/main/masterinfo/info["+curCnt+"]");
  640. }
  641. }
  642. ]]>
  643. </script>
  644. <script type="javascript" ev:event="ondblclick">
  645. <![CDATA[
  646. //opener check 추가 by 손주연 2008-01-04
  647. if( !checkOpener() ) {
  648. if( grd_masterinfo.row < 1) return ;
  649. grd_masterinfo.editCell();
  650. return ;
  651. }
  652. //손주연 수정 종료
  653. var srchexclsYN = opener.javascript.getParameter("srchexcls");
  654. srchdropYN = opener.javascript.getParameter("srchdrop");
  655. if( srchexclsYN == "Y" || srchdropYN == "Y"){
  656. iRow = grd_masterinfo.row;
  657. if(iRow < 1){
  658. return;
  659. }
  660. model.setValue("/root/main/masterinfo/info[" + iRow + "]/check", "true");
  661. grd_masterinfo.refresh();
  662. fSetOpenerValue(iRow);
  663. //2008-01-17 손주연 수정 시작
  664. //if(model.getValue("/root/temp/getdata/endVal") == "E")
  665. window.close();
  666. //2008-01-17 손주연 수정 종료
  667. }
  668. ]]>
  669. </script>
  670. <script type="javascript" ev:event="onendedit">
  671. <![CDATA[
  672. //enter시 입력 추가 by 손주연 2008-01-04
  673. if( (grd_masterinfo.col == 3) && (event.keyCode == 13 ) ) {
  674. fAddCnts();
  675. }
  676. //손주연 수정 종료
  677. ]]>
  678. </script>
  679. <script type="javascript" ev:event="onaftersort">
  680. <![CDATA[
  681. grd_masterinfo.gridToInstance();
  682. ]]>
  683. </script>
  684. </datagrid>
  685. <button id="btn_upviewmode" class="icon_top" style="left:837px; top:74px; width:26px; height:19px; font-size:11pt; font-weight:bold; ">
  686. <caption/>
  687. <script type="javascript" ev:event="DOMActivate">
  688. <![CDATA[
  689. fMoveRow( "T", 1 );
  690. ]]>
  691. </script>
  692. <hint>
  693. <![CDATA[위로]]>
  694. </hint>
  695. </button>
  696. <button id="btn_downviewmode" class="icon_bottom" style="left:865px; top:74px; width:26px; height:19px; font-size:11pt; font-weight:bold; ">
  697. <caption/>
  698. <script type="javascript" ev:event="DOMActivate">
  699. <![CDATA[
  700. fMoveRow( "B", 1 );
  701. ]]>
  702. </script>
  703. <hint>
  704. <![CDATA[아래로]]>
  705. </hint>
  706. </button>
  707. <button id="btn_upviewmode2" class="icon_top" style="left:809px; top:74px; width:26px; height:19px; ">
  708. <caption/>
  709. <script type="javascript" ev:event="DOMActivate">
  710. <![CDATA[
  711. fMoveRow( "T", 2 );
  712. ]]>
  713. </script>
  714. <hint>
  715. <![CDATA[맨위로]]>
  716. </hint>
  717. </button>
  718. <button id="btn_downviewmode2" class="icon_bottom" style="left:893px; top:74px; width:26px; height:19px; font-size:11pt; font-weight:bold; ">
  719. <caption/>
  720. <script type="javascript" ev:event="DOMActivate">
  721. <![CDATA[
  722. fMoveRow( "B", 2 );
  723. ]]>
  724. </script>
  725. <hint>
  726. <![CDATA[맨아래로]]>
  727. </hint>
  728. </button>
  729. <button id="btn_save2" class="btn2_letter2" disabled="true" visibility="hidden" style="left:448px; top:0px; width:42px; height:19px; ">
  730. <caption>저장</caption>
  731. <script type="javascript" ev:event="DOMActivate">
  732. <![CDATA[
  733. model.removeNodeset("/root/send");
  734. model.makeValue("/root/send/savedata/list", grd_masterinfo.getUpdateData());
  735. if( submit("TXMQP02601") ){
  736. btn_save2.disabled = true;
  737. }
  738. ]]>
  739. </script>
  740. </button>
  741. </group>
  742. </xhtml:body>
  743. </xhtml:html>