SPPIZ01100_확인코드조회.xfdl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPPIZ01100" position="absolute 0 0 580 560" titletext="확인코드조회" oninit="model1_oninit" onload="SPPIZ01100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="group3" position="absolute 5 69 574 536" anchor="default" positiontype="position" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Static id="Static00" position="absolute 0 21 562 47" class="sta_DA_box" anchor="default"/>
  11. <Edit id="opt_code" class="input_default" position="absolute 76 24 560 44" anchor="default" imemode="alpha" ontextchanged="group3_opt_code_ontextchanged" positiontype="position" inputmode="upper"/>
  12. <Static id="caption1" class="tit_2" position="absolute 0 3 126 23" anchor="default" text="확인코드" positiontype="position"/>
  13. <Static id="caption2" class="cell_1" position="absolute 1 22 75 46" anchor="default" text="입력코드" positiontype="position"/>
  14. <Shape id="line1" class="line_3" position="absolute -2 44 568 44" anchor="default" linetype="horizontal" positiontype="position"/>
  15. <Shape id="line2" class="line_1" position="absolute -2 15 568 15" anchor="default" linetype="horizontal" positiontype="position"/>
  16. <Grid id="grd_codelist" position="absolute 1 49 563 462" anchor="default" binddataset="ds_grid_grd_codelist" oncelldblclick="grd_codelist_oncelldblclick" autofittype="col" cellsizingtype="col" oncellclick="group3_grd_codelist_oncellclick" positiontype="position">
  17. <Formats>
  18. <Format id="default">
  19. <Columns>
  20. <Column size="30"/>
  21. <Column size="85"/>
  22. <Column size="147"/>
  23. <Column size="279"/>
  24. </Columns>
  25. <Rows>
  26. <Row size="22" band="head"/>
  27. <Row size="20"/>
  28. </Rows>
  29. <Band id="head">
  30. <Cell text="선택"/>
  31. <Cell col="1" text="코드"/>
  32. <Cell col="2" text="내역"/>
  33. <Cell col="3" text="영문"/>
  34. </Band>
  35. <Band id="body">
  36. <Cell displaytype="checkbox" edittype="checkbox" text="bind:chos"/>
  37. <Cell col="1" style="align:left middle;" text="bind:cdid"/>
  38. <Cell col="2" style="align:left middle;" text="bind:cdnm"/>
  39. <Cell col="3" style="align:left middle;" text="bind:detldesc"/>
  40. <Cell col="4"/>
  41. <Cell col="5"/>
  42. </Band>
  43. </Format>
  44. </Formats>
  45. </Grid>
  46. <Static id="Static32" text="w74" class="sta_guide" visible="false" position="absolute 36 -41 110 -11" anchor="default"/>
  47. </Layout>
  48. </Layouts>
  49. </Div>
  50. <Shape id="line13" class="line_4" position="absolute 490 6 490 29" anchor="default" positiontype="position" linetype="vertical"/>
  51. <Button id="button1" taborder="6" text="취소" onlbuttonup="button1_onlbuttonup" class="btn4" position="absolute 453 534 509 554" positiontype="position" onclick="button1_onclick"/>
  52. <Button id="button42" taborder="7" text="입력" onlbuttonup="button42_onlbuttonup" class="btn4" position="absolute 395 534 451 554" positiontype="position" onclick="button42_onclick"/>
  53. <Div id="group5" taborder="8" style="align:center top;" class="div_SA" position="absolute 1 27 566 69">
  54. <Layouts>
  55. <Layout>
  56. <Static id="caption4" text="조회구분" class="search_name" position="absolute 15 11 101 28" anchor="default" positiontype="position"/>
  57. <Combo id="cmb_srchcond1" taborder="1" class="combo_s_default" position="absolute 94 10 194 30" anchor="default" codecolumn="value" datacolumn="label" innerdataset="@ds_init_cmb_srchcond1" onitemchanged="group5_cmb_srchcond1_onitemchanged" positiontype="position"/>
  58. <Radio id="rdo_srchcond2" taborder="2" columncount="2" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 218 10 318 30" anchor="default" onitemchanged="group5_rdo_srchcond2_onitemchanged" positiontype="position">
  59. <Dataset id="innerdataset">
  60. <ColumnInfo>
  61. <Column id="codecolumn" size="256"/>
  62. <Column id="datacolumn" size="256"/>
  63. </ColumnInfo>
  64. <Rows>
  65. <Row>
  66. <Col id="codecolumn">1</Col>
  67. <Col id="datacolumn">코드</Col>
  68. </Row>
  69. <Row>
  70. <Col id="codecolumn">2</Col>
  71. <Col id="datacolumn">내역</Col>
  72. </Row>
  73. </Rows>
  74. </Dataset>
  75. </Radio>
  76. <Edit id="ipt_srchcond3" taborder="3" class="input_search" position="absolute 324 10 479 30" anchor="default" imemode="alpha" onkeydown="group5_ipt_srchcond3_onkeydown" inputmode="upper" inputtype="numberandenglish" positiontype="position"/>
  77. <Button id="btn_search" taborder="4" text="조회" onlbuttonup="btn_search_onlbuttonup" class="btn1" position="absolute 496 10 552 30" anchor="default" onclick="btn_search_onclick" positiontype="position"/>
  78. </Layout>
  79. </Layouts>
  80. </Div>
  81. <Static id="caption1" text="확인코드조회" class="tit_1" position="absolute 1 0 178 26"/>
  82. <Button id="btn_confirm" taborder="9" text="닫기" onlbuttonup="button1_onlbuttonup" class="btn4" position="absolute 511 534 567 554" onclick="btn_confirm_onclick"/>
  83. </Layout>
  84. </Layouts>
  85. <Objects>
  86. <Dataset id="ds_grid_grd_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  87. <ColumnInfo>
  88. <Column id="chos" type="STRING"/>
  89. <Column id="cdid" type="STRING"/>
  90. <Column id="cdnm" type="STRING"/>
  91. <Column id="detldesc" type="STRING"/>
  92. <Column id="srchflag" type="STRING" size="256"/>
  93. </ColumnInfo>
  94. </Dataset>
  95. <Dataset id="ds_init_cmb_srchcond1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  96. <ColumnInfo>
  97. <Column id="label" type="STRING" size="256"/>
  98. <Column id="value" type="STRING" size="256"/>
  99. </ColumnInfo>
  100. <Rows>
  101. <Row>
  102. <Col id="label">전체</Col>
  103. <Col id="value">0</Col>
  104. </Row>
  105. <Row>
  106. <Col id="label">검체</Col>
  107. <Col id="value">1</Col>
  108. </Row>
  109. <Row>
  110. <Col id="label">부위</Col>
  111. <Col id="value">2</Col>
  112. </Row>
  113. <Row>
  114. <Col id="label">진료과</Col>
  115. <Col id="value">3</Col>
  116. </Row>
  117. </Rows>
  118. </Dataset>
  119. <Dataset id="ds_init_rdo_srchcond2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  120. <ColumnInfo>
  121. <Column id="label" type="STRING" size="256"/>
  122. <Column id="value" type="STRING" size="256"/>
  123. </ColumnInfo>
  124. <Rows>
  125. <Row>
  126. <Col id="label">코드</Col>
  127. <Col id="value">1</Col>
  128. </Row>
  129. <Row>
  130. <Col id="label">내역</Col>
  131. <Col id="value">2</Col>
  132. </Row>
  133. </Rows>
  134. </Dataset>
  135. </Objects>
  136. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  137. * System Name :
  138. * Job Name :
  139. * Creator :
  140. * Make Date : 2016-05-24
  141. * Description :
  142. *---------------------------------------------------------------------------------------
  143. * Modify Date Modifier Modify Description
  144. *---------------------------------------------------------------------------------------
  145. * 2016-05-24 Live Converter TF->XP
  146. *
  147. *---------------------------------------------------------------------------------------
  148. ****************************************************************************************/
  149. include "com_commonxp::comm_main.xjs";
  150. var code = "";
  151. function lf_Initialize() {
  152. group5.cmb_srchcond1.value = 0;
  153. group5.rdo_srchcond2.value = 1;
  154. ds_grid_grd_codelist.clearData();
  155. if( frmf_checkOpener () ) {
  156. // opener에 설정된 확인코드를 초기 입력코드 값으로 한다.
  157. code = sCode;
  158. if( utlf_isNull(code) ) {
  159. group3.opt_code.value = "";
  160. }
  161. else {
  162. var len = code.length;
  163. if( len > 0 ) {
  164. code = "/" + code;
  165. group3.opt_code.value = code;
  166. }
  167. }
  168. }
  169. // 팝업 화면으로 사용시 기본적으로 전체 조회 상태가 된다.
  170. btn_search_onclick();
  171. // 확인코드가 있는 상태로 팝업창이 열리면 코드 체크된 상태로 표시
  172. if( !utlf_isNull( code ) ) {
  173. var codeArr = new Array();
  174. codeArr = code.split("/");
  175. var cdid = "";
  176. var reqcdid = "";
  177. var rowCnt = ds_grid_grd_codelist.rowcount;
  178. for(i = 0 ; i < codeArr.length ; i++) {
  179. reqcdid = codeArr[i];
  180. for( j = 0 ; j < rowCnt; j++) {
  181. cdid = ds_grid_grd_codelist.getColumn(j, "cdid") ;
  182. if( reqcdid == cdid ) {
  183. ds_grid_grd_codelist.setColumn(j, "chos", 1);
  184. }
  185. }
  186. }
  187. }
  188. ds_grid_grd_codelist.rowposition = -1;
  189. group5.cmb_srchcond1.setFocus();
  190. }
  191. function lf_SetSelectedData()
  192. {
  193. // 자신을 Open한 opener의 현재 UID가 자신을 open한 시점의 UID와 비교하여 변경되었는지 여부를 반환
  194. if( frmf_checkOpener()) {
  195. var rtnObj = new Object();
  196. code = group3.opt_code.value;
  197. var len = code.length;
  198. if( len > 1 ) {
  199. var tmp = code.substring(0, 1);
  200. if( tmp == "/" ) {
  201. code = code.substring(1, len);
  202. }
  203. rtnObj.sCode = code;
  204. }
  205. rtnObj.sExit = "Y";
  206. this.close(rtnObj);
  207. }
  208. else {
  209. sysf_messageBox("상위화면이 변경되어 데이터를 전달할 수", "I004"); // 없습니다.
  210. this.close();
  211. }
  212. }
  213. function SPPIZ01100_onload(obj:Form, e:LoadEventInfo)
  214. {
  215. frmf_initForm(obj); // 화면공통
  216. lf_Initialize(); // 화면을 초기화한다.
  217. //그리드 정렬
  218. grdf_initGrid(group3.grd_codelist);
  219. }
  220. function grd_codelist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  221. {
  222. var curRow = e.row;
  223. if (utlf_isNull(group3.opt_code.value)) {
  224. code = "";
  225. }
  226. // if( ds_grid_grd_codelist.getColumn(curRow, "chos") == 0 ) {
  227. // code = code + "/" + ds_grid_grd_codelist.getColumn(curRow, "cdid");
  228. // ds_grid_grd_codelist.setColumn(curRow, "chos", 1);
  229. // }
  230. // else {
  231. // var rowCnt = ds_grid_grd_codelist.rowcount;
  232. // code = "";
  233. // ds_grid_grd_codelist.setColumn(curRow, "chos", 0);
  234. // for( i = 0 ; i < rowCnt ; i++) {
  235. // if( ds_grid_grd_codelist.getColumn(i, "chos") == 1 ) {
  236. // code += "/" + ds_grid_grd_codelist.getColumn(i, "cdid");
  237. // }
  238. // }
  239. // }
  240. group3.opt_code.value += "/" + ds_grid_grd_codelist.getColumn(curRow, "cdid");
  241. }
  242. function button42_onclick(obj:Button, e:ClickEventInfo)
  243. {
  244. // 선택된 Message를 Opener 에 전달한다.
  245. lf_SetSelectedData();
  246. }
  247. function button1_onclick(obj:Button, e:ClickEventInfo)
  248. {
  249. group3.opt_code.value = "";
  250. var rowCnt = ds_grid_grd_codelist.rowcount;
  251. for( i = 0 ; i < rowCnt ; i++) {
  252. ds_grid_grd_codelist.setColumn(i, "chos", 0);
  253. }
  254. }
  255. function btn_search_onclick(obj:Button, e:ClickEventInfo)
  256. {
  257. ds_grid_grd_codelist.clearData();
  258. var str = group5.ipt_srchcond3.value;
  259. //flag: 내역으로 검색할 때 1이면 내역(한글)으로 정렬, 2이면 내역(영문)으로 정렬
  260. if( !utlf_isNull(str) ) {
  261. if( !utlf_isAlphabet( str.substring(0, 1) ) ) { //첫 글자가 영문이 아닐 때
  262. var flag = 1;
  263. }
  264. else {
  265. var flag = 2;
  266. }
  267. }
  268. else {
  269. var flag = "";
  270. }
  271. // TRPIZ01101
  272. var sInDs = dsf_createDsRow("ds_cond_TRPZZ00102"
  273. , [{col: "srchcond1", val: group5.rdo_srchcond2.value }
  274. , {col: "srchcond2", val: group5.ipt_srchcond3.value }
  275. , {col: "srchflag", val: group5.cmb_srchcond1.value }
  276. , {col: "flag" , val: flag}
  277. ]);
  278. var oParam = {};
  279. oParam.id = "TRPIZ01101";
  280. oParam.service = "insucomapp.CnfmCdSrch";
  281. oParam.method = "reqGetCnfmCdSrchList";
  282. oParam.inds = "req="+sInDs;
  283. oParam.outds = "ds_grid_grd_codelist=cnfmcdlist";
  284. oParam.async = false;
  285. oParam.callback = "cf_TRPIZ01101";
  286. tranf_submit(oParam);
  287. }
  288. function Button00_onclick(obj:Button, e:ClickEventInfo)
  289. {
  290. this.close();
  291. }
  292. function group5_cmb_srchcond1_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  293. {
  294. btn_search_onclick();
  295. }
  296. function group5_ipt_srchcond3_onkeydown(obj:Edit, e:KeyEventInfo)
  297. {
  298. if( e.keycode == 13 ) {
  299. btn_search_onclick();
  300. }
  301. }
  302. function group3_opt_code_ontextchanged(obj:Edit, e:TextChangedEventInfo)
  303. {
  304. code = obj.value;
  305. }
  306. function group3_grd_codelist_oncellclick(obj:Grid, e:GridClickEventInfo)
  307. {
  308. if( e.col == 0 ) {
  309. var curRow = e.row;
  310. if( ds_grid_grd_codelist.getColumn(curRow, "chos") == 0) {
  311. ds_grid_grd_codelist.setColumn(curRow, "chos", 0);
  312. }
  313. else {
  314. ds_grid_grd_codelist.setColumn(curRow, "chos", 1);
  315. }
  316. var rowCnt = ds_grid_grd_codelist.rowcount;
  317. code = "";
  318. for( i = 0 ; i < rowCnt ; i++) {
  319. if( ds_grid_grd_codelist.getColumn(i, "chos") == 1 ) {
  320. code += "/" + ds_grid_grd_codelist.getColumn(i, "cdid");
  321. }
  322. }
  323. group3.opt_code.value = code ;
  324. }
  325. }
  326. function cf_TRPIZ01101(aSvcId, nErrorCode, sErrorMsg) {
  327. if( nErrorCode < 0 ) {
  328. alert( sErrorMsg );
  329. }
  330. else {
  331. var rowCnt = ds_grid_grd_codelist.rowcount;
  332. ds_grid_grd_codelist.updatecontrol = false;
  333. for( i = 0 ; i < rowCnt ; i++) {
  334. if( ds_grid_grd_codelist.getColumn(i, "chos") == "true" ) {
  335. ds_grid_grd_codelist.setColumn(i, "chos", 1);
  336. }
  337. else {
  338. ds_grid_grd_codelist.setColumn(i, "chos", 0);
  339. }
  340. }
  341. ds_grid_grd_codelist.updatecontrol = true;
  342. }
  343. }
  344. function group5_rdo_srchcond2_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  345. {
  346. switch(obj.value) {
  347. case "2" : //내역
  348. group5.ipt_srchcond3.imemode = "hangul"; //기본입력방식
  349. group5.ipt_srchcond3.inputmode = "normal"; //대소문자구분
  350. group5.ipt_srchcond3.inputtype = "normal"; //입력문자종류
  351. group5.ipt_srchcond3.value = "";
  352. break;
  353. case "1" : //코드
  354. default:
  355. group5.ipt_srchcond3.imemode = "alpha"; //기본입력방식
  356. group5.ipt_srchcond3.inputmode = "upper"; //대소문자구분
  357. group5.ipt_srchcond3.inputtype = "numberandenglish"; //입력문자종류
  358. group5.ipt_srchcond3.value = "";
  359. break;
  360. }
  361. }
  362. function btn_confirm_onclick(obj:Button, e:ClickEventInfo)
  363. {
  364. this.close();
  365. }
  366. ]]></Script>
  367. </Form>
  368. </FDL>