SPMMD06300_CPG기초임상정보선택.xfdl 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.4">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMMD06300" position="absolute 0 0 394 659" titletext="기초 임상정보" onload="SPMMD06300_onload">
  5. <Layouts>
  6. <Layout>
  7. <Shape position="absolute 0 19 393 59" id="roundrect3" type="roundrectangle"/>
  8. <Div position="absolute 0 626 390 656" id="grp_btn">
  9. <Layouts>
  10. <Layout>
  11. <Button position="absolute 274 4 330 24" id="button7" class="btn4" text="등록" onclick="grp_btn_button7_onclick" anchor="default"/>
  12. <Button position="absolute 332 4 388 24" id="button3" class="btn4" text="닫기" onclick="grp_btn_button3_onclick" anchor="default"/>
  13. </Layout>
  14. </Layouts>
  15. </Div>
  16. <Grid position="absolute 0 480 393 624" id="grd_selectitemlist" binddataset="ds_main_selectitemlist" autofittype="col">
  17. <Formats>
  18. <Format id="default">
  19. <Columns>
  20. <Column size="0"/>
  21. <Column size="0"/>
  22. <Column size="182"/>
  23. <Column size="58"/>
  24. <Column size="35"/>
  25. <Column size="58"/>
  26. <Column size="35"/>
  27. <Column size="80"/>
  28. <Column size="0"/>
  29. <Column size="0"/>
  30. <Column size="0"/>
  31. <Column size="0"/>
  32. <Column size="0"/>
  33. <Column size="0"/>
  34. </Columns>
  35. <Rows>
  36. <Row size="24" band="head"/>
  37. <Row size="24"/>
  38. </Rows>
  39. <Band id="head">
  40. <Cell text="testitemcd"/>
  41. <Cell col="1" text="testcd"/>
  42. <Cell col="2" text="검사항목"/>
  43. <Cell col="3" colspan="2" text="하한치" taborder="undefined"/>
  44. <Cell col="5" colspan="2" text="상한치" taborder="undefined"/>
  45. <Cell col="7" text="단위"/>
  46. <Cell col="8" text="refseq"/>
  47. <Cell col="9" text="alertcdflag"/>
  48. <Cell col="10" text="alertrem"/>
  49. <Cell col="11" text="alertprecondyn"/>
  50. <Cell col="12" text="checkyn"/>
  51. <Cell col="13" text="m"/>
  52. </Band>
  53. <Band id="body">
  54. <Cell text="bind:testitemcd"/>
  55. <Cell col="1" text="bind:testcd"/>
  56. <Cell col="2" text="bind:testnm"/>
  57. <Cell col="3" displaytype="text" edittype="text" text="bind:reflval"/>
  58. <Cell col="4" displaytype="combo" edittype="combo" text="bind:lvalappflag"/>
  59. <Cell col="5" displaytype="text" edittype="text" text="bind:refhval"/>
  60. <Cell col="6" displaytype="combo" edittype="combo" text="bind:hvalappflag"/>
  61. <Cell col="7" text="bind:unitnm"/>
  62. <Cell col="8" text="bind:refseq"/>
  63. <Cell col="9" text="bind:alertcdflag"/>
  64. <Cell col="10" text="bind:alertrem"/>
  65. <Cell col="11" text="bind:alertprecondyn"/>
  66. <Cell col="12" text="bind:checkyn"/>
  67. <Cell col="13" text="bind:m"/>
  68. </Band>
  69. </Format>
  70. </Formats>
  71. </Grid>
  72. <Button position="absolute 330 29 386 49" id="btn_srch" class="btn1" text="조회" onclick="btn_srch_onclick"/>
  73. <Static text="검사항목 :" position="absolute 3 30 93 50" id="caption4" class="search_name"/>
  74. <Static text="선택 기초 임상정보" position="absolute 4 459 146 479" id="caption5" class="tit_2"/>
  75. <Edit position="absolute 93 30 320 50" id="input3" onkeydown="input3_onkeydown" oneditclick="input3_oneditclick"/>
  76. <Button position="absolute 285 459 349 479" id="button6" class="btn2" text="항목추가" onclick="button6_onclick"/>
  77. <Grid position="absolute 0 63 393 453" id="grd_baselist" binddataset="ds_main_codelist" oncellclick="grd_baselist_oncellclick" autofittype="col" oncelldblclick="grd_baselist_oncelldblclick">
  78. <Formats>
  79. <Format id="default">
  80. <Columns>
  81. <Column size="38"/>
  82. <Column size="298"/>
  83. <Column size="0"/>
  84. <Column size="0"/>
  85. <Column size="0"/>
  86. <Column size="90"/>
  87. </Columns>
  88. <Rows>
  89. <Row size="24" band="head"/>
  90. <Row size="24"/>
  91. </Rows>
  92. <Band id="head">
  93. <Cell text="선택"/>
  94. <Cell col="1" text="검사항목"/>
  95. <Cell col="2" text="itemcd"/>
  96. <Cell col="3" text="depth"/>
  97. <Cell col="4" text="refseq"/>
  98. <Cell col="5" text="단위"/>
  99. </Band>
  100. <Band id="body">
  101. <Cell displaytype="checkbox" edittype="checkbox" text="bind:boolflag"/>
  102. <Cell col="1" text="bind:itemnm"/>
  103. <Cell col="2" text="bind:itemcd"/>
  104. <Cell col="3" text="bind:depth"/>
  105. <Cell col="4" text="bind:refseq"/>
  106. <Cell col="5" text="bind:unitnm"/>
  107. </Band>
  108. </Format>
  109. </Formats>
  110. </Grid>
  111. <Static text="기초 임상정보" position="absolute 0 0 142 20" id="caption14" class="tit_2"/>
  112. <Button position="absolute 351 459 393 479" id="button1" class="btn2_letter2" text="삭제" onclick="button1_onclick"/>
  113. </Layout>
  114. </Layouts>
  115. <Objects>
  116. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  117. <ColumnInfo>
  118. <Column id="chkinfo" type="STRING" size="256"/>
  119. <Column id="itemnm" type="STRING" size="256"/>
  120. <Column id="alertcdflag" type="STRING" size="256"/>
  121. </ColumnInfo>
  122. <Rows>
  123. <Row>
  124. <Col id="chkinfo">B</Col>
  125. <Col id="itemnm"/>
  126. <Col id="alertcdflag"/>
  127. </Row>
  128. </Rows>
  129. </Dataset>
  130. <Dataset id="ds_main_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  131. <ColumnInfo>
  132. <Column id="boolflag" type="STRING"/>
  133. <Column id="itemnm" type="STRING"/>
  134. <Column id="itemcd" type="STRING"/>
  135. <Column id="depth" type="STRING"/>
  136. <Column id="refseq" type="STRING"/>
  137. <Column id="unitnm" type="STRING"/>
  138. </ColumnInfo>
  139. </Dataset>
  140. <Dataset id="ds_main_selectitemlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  141. <ColumnInfo>
  142. <Column id="testitemcd" type="STRING"/>
  143. <Column id="testcd" type="STRING"/>
  144. <Column id="testnm" type="STRING"/>
  145. <Column id="reflval" type="STRING"/>
  146. <Column id="lvalappflag" type="STRING"/>
  147. <Column id="refhval" type="STRING"/>
  148. <Column id="hvalappflag" type="STRING"/>
  149. <Column id="unitnm" type="STRING"/>
  150. <Column id="refseq" type="STRING"/>
  151. <Column id="alertcdflag" type="STRING"/>
  152. <Column id="alertrem" type="STRING"/>
  153. <Column id="alertprecondyn" type="STRING"/>
  154. <Column id="checkyn" type="STRING"/>
  155. <Column id="m" type="STRING"/>
  156. </ColumnInfo>
  157. </Dataset>
  158. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  159. </Objects>
  160. <Bind>
  161. <BindItem id="item0" compid="input3" propid="value" datasetid="ds_main_cond" columnid="itemnm"/>
  162. </Bind>
  163. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  164. * System Name :
  165. * Job Name :
  166. * Creator :
  167. * Make Date : 2015-04-03
  168. * Description :
  169. *---------------------------------------------------------------------------------------
  170. * Modify Date Modifier Modify Description
  171. *---------------------------------------------------------------------------------------
  172. * 2015-04-03 Live Converter TF->XP
  173. *
  174. *---------------------------------------------------------------------------------------
  175. ****************************************************************************************/
  176. include "com_commonxp::comm_main.xjs";
  177. var openflag = "";
  178. function SPMMD06300_onload(obj:Form, e:LoadEventInfo)
  179. {
  180. var openflag = opener.ds_main_cond.getColumn(0, "condbutton"); //opener.model.getValue("/root/main/cond/condbutton");
  181. var alertcdflag = opener.ds_main_cond.getColumn(0, "alertcdflag"); //opener.model.getValue("/root/main/cond/alertcdflag");
  182. ds_main_codelist.clearData(); //model.removeNodeset("/root/main/codeinfo/codelist");
  183. ds_main_selectitemlist.clearData(); //model.removeNodeset("/root/main/selectitemlnfo/selectitemlist");
  184. ds_main_cond.setColumn(0, "alertcdflag", alertcdflag); //model.setValue("/root/main/cond/alertcdflag", alertcdflag);
  185. var ev = new ClickEventInfo;
  186. frmf_inputEnterKey("btn_srch", "onclick", ev ); //btn_srch.dispatch("DOMActivate");
  187. //model.refresh();
  188. }
  189. /**
  190. * @desc : 단일 진단코드 선택, 그리드 클릭
  191. * @
  192. * @param : trgtrow - 현재 클릭한 그리드의 row 위치
  193. * @return :
  194. * @---------------------------------------------------
  195. */
  196. function fAddDiag(trgtrow){
  197. var supcd = ds_main_codelist.getColumn(trgtrow, "supcd"); //model.getValue("/root/main/codeinfo/codelist[" + trgtrow + "]/supcd");
  198. var itemcd = ds_main_codelist.getColumn(trgtrow, "itemcd"); //model.getValue("/root/main/codeinfo/codelist[" + trgtrow + "]/itemcd");
  199. var itemnm = ds_main_codelist.getColumn(trgtrow, "itemnm"); //model.getValue("/root/main/codeinfo/codelist[" + trgtrow + "]/itemnm");
  200. var unitnm = ds_main_codelist.getColumn(trgtrow, "unitnm"); //model.getValue("/root/main/codeinfo/codelist[" + trgtrow + "]/unitnm");
  201. if (utlf_isNull(unitnm)) unitnm = "-";
  202. var fndrow = ds_main_selectitemlist.findRow("testcd", itemcd); //grd_selectitemlist.findRow(itemcd, 1, 0, "true", "true");
  203. if(fndrow < 0){
  204. ds_main_selectitemlist.addRow(); // grd_selectitemlist.addRow(false);
  205. currow = ds_main_selectitemlist.rowposition; // currow = grd_selectitemlist.row;
  206. ds_main_selectitemlist.setColumn(currow, "testitemcd", "supcd"); // model.makeValue("/root/main/selectitemlnfo/selectitemlist[" + currow + "]/testitemcd" , supcd);
  207. ds_main_selectitemlist.setColumn(currow, "testcd", "itemcd"); // model.makeValue("/root/main/selectitemlnfo/selectitemlist[" + currow + "]/testcd" , itemcd);
  208. ds_main_selectitemlist.setColumn(currow, "testnm", "itemnm"); // model.makeValue("/root/main/selectitemlnfo/selectitemlist[" + currow + "]/testnm" , itemnm);
  209. ds_main_selectitemlist.setColumn(currow, "unitnm", "unitnm"); // model.makeValue("/root/main/selectitemlnfo/selectitemlist[" + currow + "]/unitnm" , unitnm);
  210. ds_main_selectitemlist.setColumn(currow, "lvalappflag", "U"); // model.makeValue("/root/main/selectitemlnfo/selectitemlist[" + currow + "]/lvalappflag" , "U");
  211. ds_main_selectitemlist.setColumn(currow, "hvalappflag", "D"); // model.makeValue("/root/main/selectitemlnfo/selectitemlist[" + currow + "]/hvalappflag" , "D");
  212. }
  213. //model.refresh();
  214. }
  215. /**
  216. * @desc : 다수의 진단코드 선택 후, 진단추가버튼 클릭
  217. * @ : 1. check box에 선택된 진단을 추가
  218. * @ : 2. ctrl + mouse select로 선택된 진단을 추가
  219. * @param :
  220. * @return :
  221. * @---------------------------------------------------
  222. */
  223. function fAppendDiagCD(){
  224. var totrow = ds_main_codelist.rowcount; //grd_baselist.rows;
  225. for(var i = 0; i < totrow; i++){
  226. var bflag = ds_main_codelist.getColumn(i, "boolflag"); //grd_baselist.valueMatrix(i, grd_baselist.colRef("boolflag"));
  227. if(bflag == "Y"){
  228. fAddDiag(i);
  229. ds_main_codelist.setColumn(i, "boolflag", "N"); //grd_baselist.valueMatrix(i, grd_baselist.colRef("boolflag")) = "N"; //복사한 진단은 check box의 값을 해체
  230. }
  231. }
  232. //grd_selectitemlist.rebuild();
  233. }
  234. /**
  235. * @desc : 진단코드리스트 전달
  236. * @
  237. * @param :
  238. * @return :
  239. * @---------------------------------------------------
  240. */
  241. function fSendItemCDList(){
  242. if(frmf_checkOpener()){
  243. var condbutton = opener.ds_main_cond.getColumn(0, "condbutton"); //opener.model.getValue("/root/main/cond/condbutton");
  244. var alertcdflag = opener.ds_main_cond.getColumn(0, "alertcdflag"); //opener.model.getValue("/root/main/cond/alertcdflag");
  245. if (condbutton == "IF") {
  246. var sRows = ds_main_selectitemlist.rowcount; //grd_selectitemlist.rows;
  247. var testnm = ds_main_selectitemlist.getColumn(0, "testnm"); //model.getValue("/root/main/selectitemlnfo/selectitemlist/testnm");
  248. var testitemcd = ds_main_selectitemlist.getColumn(0, "testitemcd"); //model.getValue("/root/main/selectitemlnfo/selectitemlist/testitemcd");
  249. var testcd = ds_main_selectitemlist.getColumn(0, "testcd"); //model.getValue("/root/main/selectitemlnfo/selectitemlist/testcd");
  250. var refhval = ds_main_selectitemlist.getColumn(0, "refhval"); //model.getValue("/root/main/selectitemlnfo/selectitemlist/refhval");
  251. var reflval = ds_main_selectitemlist.getColumn(0, "reflval"); //model.getValue("/root/main/selectitemlnfo/selectitemlist/reflval");
  252. var alertrem = testnm + " :" + reflval + "~" + refhval;
  253. var hvalappflag = ds_main_selectitemlist.getColumn(0, "hvalappflag"); //model.getValue("/root/main/selectitemlnfo/selectitemlist/hvalappflag");
  254. var lvalappflag = ds_main_selectitemlist.getColumn(0, "lvalappflag"); //model.getValue("/root/main/selectitemlnfo/selectitemlist/lvalappflag");
  255. var unitnm = ds_main_selectitemlist.getColumn(0, "unitnm"); //model.getValue("/root/main/selectitemlnfo/selectitemlist/unitnm");
  256. var alertprecondyn = "Y";
  257. var rtn = "testitemcd▦testcd▦testnm▦hvalappflag▦lvalappflag▦refhval▦reflval▦unitnm▦refseq▦alertcdflag▦alertrem▦alertprecondyn▦checkyn▦m" ;
  258. rtn += "▩" + testitemcd + "▦" + testcd + "▦" + testnm + "▦" + hvalappflag + "▦" + lvalappflag+ "▦" + refhval + "▦" + reflval + "▦" + unitnm + "▦" + "▦" + alertcdflag + "▦" + alertrem + "▦" + alertprecondyn + "▦" + "▦";
  259. opener.frmf_setParameter( "SPMMD06100_detlinfo", rtn );
  260. //}
  261. } else {
  262. if ( ds_main_selectitemlist.rowcount < "1" ) {
  263. sysf_messageBox ( "선택된 처방이", "I004" );
  264. }
  265. //var rtn1 = getItemNodeListCSV ( model.instances(0).selectNodes( "/root/main/selectitemlnfo/selectitemlist" ));
  266. var rtn = "testitemcd▦testcd▦testnm▦hvalappflag▦lvalappflag▦refhval▦reflval▦unitnm▦refseq▦alertcdflag▦alertrem▦alertprecondyn▦checkyn▦m" ;
  267. //var Select_Path = "/root/main/selectitemlnfo/selectitemlist";
  268. for (i = 0; i < ds_main_selectitemlist.rowcount; i ++) {
  269. var testitemcd = ds_main_selectitemlist.getColumn(i, "testitemcd"); //model.getValue(Select_Path + "[" + i + "]/testitemcd");
  270. var testcd = ds_main_selectitemlist.getColumn(i, "testcd"); //model.getValue(Select_Path + "[" + i + "]/testcd");
  271. var testnm = ds_main_selectitemlist.getColumn(i, "testnm"); //model.getValue(Select_Path + "[" + i + "]/testnm");
  272. var hvalappflag = ds_main_selectitemlist.getColumn(i, "hvalappflag"); //model.getValue(Select_Path + "[" + i + "]/hvalappflag");
  273. var lvalappflag = ds_main_selectitemlist.getColumn(i, "lvalappflag"); //model.getValue(Select_Path + "[" + i + "]/lvalappflag");
  274. var refhval = ds_main_selectitemlist.getColumn(i, "refhval"); //model.getValue(Select_Path + "[" + i + "]/refhval");
  275. var reflval = ds_main_selectitemlist.getColumn(i, "reflval"); //model.getValue(Select_Path + "[" + i + "]/reflval");
  276. var unitnm = ds_main_selectitemlist.getColumn(i, "unitnm"); //model.getValue(Select_Path + "[" + i + "]/unitnm");
  277. var refseq = ds_main_selectitemlist.getColumn(i, "refseq"); //model.getValue(Select_Path + "[" + i + "]/refseq");
  278. var alertrem = ds_main_selectitemlist.getColumn(i, "alertrem"); //model.getValue(Select_Path + "[" + i + "]/alertrem");
  279. var alertprecondyn = "N"
  280. var checkyn = ds_main_selectitemlist.getColumn(i, "checkyn"); //model.getValue(Select_Path + "[" + i + "]/checkyn");
  281. var m = ds_main_selectitemlist.getColumn(i, "m"); //model.getValue(Select_Path + "[" + i + "]/m");
  282. rtn += "▩" + testitemcd + "▦" + testcd + "▦" + testnm + "▦" + hvalappflag + "▦" + lvalappflag+ "▦" + refhval + "▦" + reflval + "▦" + unitnm + "▦" + "▦" + alertcdflag + "▦" + alertrem + "▦" + alertprecondyn + "▦" + "▦";
  283. }
  284. opener.frmf_setParameter( "SPMMD06100_detlinfo", rtn );
  285. }
  286. close();
  287. }
  288. }
  289. /**
  290. * @desc : 진단코드 전달
  291. * @ :
  292. * @param :
  293. * @return :
  294. * @---------------------------------------------------
  295. */
  296. /* 이 함수 사용 안하는 듯...
  297. function fSendDiag(currow){
  298. if(frmf_checkOpener()){
  299. //var nodelist = model.instance1.selectNodes("/root/main/selectiteminfo/selectitemlist[" + currow + "]");
  300. //var node = nodelist.item(0);
  301. var nodepath = opener.frmf_getParameter("SPMQP00300_param_nodepath");
  302. if(nodepath == ""){ //opener의 특정 nodepath를 넘겨주지 않은 경우
  303. //var selectnode = opener.instance1.selectSingleNode("/root/temp/selectitemlist");
  304. if(selectnode == null){ //opener에 node를 만든다.
  305. opener.model.makeNode("/root/temp/selectitemlist");
  306. }
  307. model.copyNode(opener.root.temp.selectitemlist, node);
  308. }else{ //opener의 특정 nodepath를 넘겨준 경우
  309. var selectnode = opener.instance1.selectSingleNode(nodepath);
  310. if(selectnode == null){ //opener에 node를 만든다.
  311. opener.model.makeNode(nodepath);
  312. }
  313. opener.model.copyNode(nodepath, node); //opener에 복사
  314. }
  315. opener.javascript.setParameter("SPMQP00300_rtn_useyn", "Y");
  316. }else{
  317. messageBox("상위 화면이 변경되어 데이터를 전달", "E001");
  318. }
  319. window.close();
  320. } */
  321. /* 사용하지 않는 함수 이 화면에서 호출하지 않음
  322. function getItemNodeListCSV(nodeList) {
  323. if( nodeList.length == 0 ){
  324. return;
  325. }
  326. var sColSep = "▦";
  327. var sRowSep = "▩";
  328. var rCSV = "";
  329. var childNodeList = nodeList.item(0).childNodes;
  330. var childNodeCnt = childNodeList.length;
  331. if( childNodeCnt == 0 ){
  332. return;
  333. }
  334. var i, j;
  335. for( i = 0; i < childNodeCnt - 1; i++) {
  336. rCSV += childNodeList.item(i).nodeName + sColSep;
  337. }
  338. rCSV += childNodeList.item(i).nodeName// + sRowSep;
  339. var node;
  340. var cnt = 1;
  341. var selCnt = 0;
  342. while( node = nodeList.nextNode() ) {
  343. rCSV += sRowSep;
  344. childNodeList = node.childNodes;
  345. for( i = 0; i < childNodeCnt - 1; i++) {
  346. rCSV += childNodeList.item(i).text + sColSep;
  347. }
  348. rCSV += childNodeList.item(i).text;
  349. selCnt++;
  350. }
  351. if ( selCnt == 0 ) {
  352. return "N"
  353. } else {
  354. return rCSV;
  355. }
  356. }*/
  357. function grp_btn_button7_onclick(obj:Button, e:ClickEventInfo)
  358. {
  359. fSendItemCDList();
  360. }
  361. function grp_btn_button3_onclick(obj:Button, e:ClickEventInfo)
  362. {
  363. close();
  364. }
  365. function btn_srch_onclick(obj:Button, e:ClickEventInfo)
  366. {
  367. ds_send_reqdata.copyData(ds_main_cond); //model.copyNode("/root/send/reqdata", "/root/main/cond");
  368. var oParam = {};
  369. oParam.id = "TRMMD06301";
  370. oParam.service = "cdssmngtapp.ClinicalRuleMngt";
  371. oParam.method = "reqGetBaseItemList";
  372. oParam.inds = "req=ds_send_reqdata";
  373. oParam.outds = "ds_main_codelist=codelist";
  374. oParam.async = false;
  375. oParam.callback = "cf_TRMMD06301";
  376. tranf_submit(oParam);
  377. //setTree(grd_baselist, grd_baselist.colRef("depth"), grd_baselist.colRef("itemnm"), false);
  378. //model.refresh();
  379. }
  380. function button6_onclick(obj:Button, e:ClickEventInfo)
  381. {
  382. fAppendDiagCD();
  383. }
  384. function grd_baselist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  385. {
  386. if ( e.row > -1 ) {
  387. var currow = ds_main_codelist.rowposition; //grd_baselist.row;
  388. if(currow > 0){
  389. var depth = ds_main_codelist.getColumn(currow, "depth"); //model.getValue("/root/main/codeinfo/codelist[" + currow + "]/depth");
  390. if (depth !="1") {
  391. fAddDiag(currow);
  392. }
  393. }
  394. }
  395. //model.refresh();
  396. }
  397. function grd_baselist_oncellclick(obj:Grid, e:GridClickEventInfo)
  398. {
  399. if ( e.row > -1 ) {
  400. var grdcol = obj.getCellPos(); //grd_baselist.col
  401. var currow = ds_main_codelist.rowposition; //grd_baselist.row
  402. var rows = ds_main_codelist.rowcount; //grd_baselist.rows
  403. var grdrow = rows - currow;
  404. var rowno = rows - 1;
  405. if (grdcol == "0") {
  406. var boolflag = ds_main_codelist.getColumn(currow, "boolflag"); //model.getValue("/root/main/codeinfo/codelist[" + currow + "]/boolflag");
  407. if (boolflag == "N" ) {
  408. ds_main_codelist.setColumn(currow, "boolflag", "N"); //model.setValue("/root/main/codeinfo/codelist[" + currow + "]/boolflag", "N");
  409. } else {
  410. ds_main_codelist.setColumn(currow, "boolflag", "Y"); //model.setValue("/root/main/codeinfo/codelist[" + currow + "]/boolflag", "Y");
  411. }
  412. var depth = ds_main_codelist.getColumn(currow, "depth"); //model.getValue("/root/main/codeinfo/codelist[" + currow + "]/depth");
  413. if (depth == "1") {
  414. if (boolflag =="Y") ds_main_codelist.setColumn(currow, "boolflag", "N"); //model.setValue("/root/main/codeinfo/codelist[" + currow + "]/boolflag", "N");
  415. for (i = 0 ; i < grdrow ; i ++ ) {
  416. currow = currow + 1;
  417. depth = ds_main_codelist.getColumn(currow, "depth"); //model.getValue("/root/main/codeinfo/codelist[" + currow + "]/depth");
  418. if (depth != "1") {
  419. if (currow <= rowno) {
  420. var boolflag = ds_main_codelist.getColumn(currow, "boolflag"); //model.getValue("/root/main/codeinfo/codelist[" + currow + "]/boolflag")
  421. if (boolflag == "Y") {
  422. ds_main_codelist.setColumn(currow, "boolflag", "N"); //model.setValue("/root/main/codeinfo/codelist[" + currow + "]/boolflag", "N");
  423. } else {
  424. ds_main_codelist.setColumn(currow, "boolflag", "Y"); //model.setValue("/root/main/codeinfo/codelist[" + currow + "]/boolflag", "Y");
  425. }
  426. }
  427. } else if (depth == "1") {
  428. return;
  429. }
  430. }
  431. }
  432. }
  433. }
  434. //model.refresh();
  435. }
  436. function button1_onclick(obj:Button, e:ClickEventInfo)
  437. {
  438. var selectedRowList = grdf_getSelectedRows(grd_selectitemlist); //grd_selectitemlist.selectedRows;
  439. if( selectedRowList > 0 ){
  440. for (var i = selectedRowList - 1; i >= 0; i--) {
  441. ds_main_selectitemlist.deleteRow(i); //model.removeNodeset("/root/main/selectitemlnfo/selectitemlist[" + grd_selectitemlist.selectedrow(i) + "]");
  442. }
  443. //grd_selectitemlist.refresh();
  444. }
  445. }
  446. function input3_onkeydown(obj:Edit, e:KeyEventInfo)
  447. {
  448. if(e.keycode == "13") {
  449. frmf_inputEnterKey("btn_srch", "DOMActivate");
  450. }
  451. }
  452. ]]></Script>
  453. </Form>
  454. </FDL>