SMAVB00100_기본코드관리.xfdl 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAVB00100" position="absolute 0 0 1201 790" titletext="Untitle" onload="SMAVB00100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="grp_title" position="absolute 0 0 1195 25" style="">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption1" class="tit_1" position="absolute 0 0 169 23" style="" text="조직은행 기본코드관리"/>
  11. </Layout>
  12. </Layouts>
  13. </Div>
  14. <Div id="group1" position="absolute 0 13 1195 757" style="">
  15. <Layouts>
  16. <Layout>
  17. <Div id="grp_sea" position="absolute 0 10 1194 45" style="align: top;" class="div_SA">
  18. <Layouts>
  19. <Layout>
  20. <Static id="caption2" class="search_name" position="absolute 16 9 102 26" style="" text="분류구분 :" anchor="default"/>
  21. <Shape id="line13" class="line_4" linetype="vertical" position="absolute 1107 7 1110 29" style="" anchor="default"/>
  22. <Button id="btn_search" class="btn1" position="absolute 1123 7 1179 29" style="" text="조회" onclick="group1_grp_sea_btn_search_onclick" anchor="default"/>
  23. <Combo innerdataset="ds_init_selectinput_item" datacolumn="etcdetlnm" codecolumn="etcdetlcd" columncount="-1" rowcount="-1" id="cmb_clscd" class="combo_essential" position="absolute 105 8 255 27" style="" anchor="default" onitemchanged="group1_grp_sea_cmb_clscd_onitemchanged"/>
  24. </Layout>
  25. </Layouts>
  26. </Div>
  27. <Static id="caption3" class="tit_2" position="absolute 5 54 83 71" style="" text="분류코드"/>
  28. <Shape id="line1" class="line_10" linetype="horizontal" position="absolute 0 71 594 75" style="" anchor="default"/>
  29. <Grid id="grd_etclst" binddataset="ds_main_bscdlstmst_item" position="absolute 0 75 594 738" style="" oncelldblclick="group1_grd_etclst_oncelldblclick">
  30. <Formats>
  31. <Format id="default">
  32. <Columns>
  33. <Column size="24"/>
  34. <Column size="100"/>
  35. <Column size="373"/>
  36. <Column size="99"/>
  37. </Columns>
  38. <Rows>
  39. <Row size="24" band="head"/>
  40. <Row size="24"/>
  41. </Rows>
  42. <Band id="head">
  43. <Cell/>
  44. <Cell col="1" text="코드"/>
  45. <Cell col="2" text="분류코드명"/>
  46. <Cell col="3" text="적용여부"/>
  47. </Band>
  48. <Band id="body">
  49. <Cell celltype="head"/>
  50. <Cell col="1" displaytype="text" edittype="text" text="bind:etccd" editlimit="10"/>
  51. <Cell col="2" displaytype="text" edittype="text" text="bind:etcdetlnm" editlimit="50"/>
  52. <Cell col="3" displaytype="checkbox" edittype="checkbox" text="bind:useyn"/>
  53. </Band>
  54. </Format>
  55. </Formats>
  56. </Grid>
  57. <Static id="caption4" class="tit_2" position="absolute 606 54 684 72" style="" text="상세코드"/>
  58. <Grid id="grd_detlcodelst" binddataset="ds_main_bscdlstdtl_item" position="absolute 601 75 1195 738" style="" onkeypress="group1_grd_detlcodelst_onkeypress">
  59. <Formats>
  60. <Format id="default">
  61. <Columns>
  62. <Column size="24"/>
  63. <Column size="60"/>
  64. <Column size="250"/>
  65. <Column size="90"/>
  66. <Column size="90"/>
  67. <Column size="90"/>
  68. <Column size="90"/>
  69. <Column size="60"/>
  70. </Columns>
  71. <Rows>
  72. <Row size="24" band="head"/>
  73. <Row size="24"/>
  74. </Rows>
  75. <Band id="head">
  76. <Cell/>
  77. <Cell col="1" text="코드"/>
  78. <Cell col="2" text="상세코드명"/>
  79. <Cell col="3" text="내용"/>
  80. <Cell col="4" text="구분"/>
  81. <Cell col="5" text="참고치"/>
  82. <Cell col="6" text="비고"/>
  83. <Cell col="7" text="적용여부"/>
  84. </Band>
  85. <Band id="body">
  86. <Cell celltype="head"/>
  87. <Cell col="1" displaytype="text" edittype="text" text="bind:etcdetlcd" editlimit="50"/>
  88. <Cell col="2" displaytype="text" edittype="text" text="bind:etcdetlnm" editlimit="50"/>
  89. <Cell col="3" displaytype="text" edittype="text" text="bind:etcitemcnts" editlimit="50"/>
  90. <Cell col="4" displaytype="combo" edittype="combo" text="bind:etcitemcnts" combodataset="ds_init_combobscdlst_C06" combocodecol="cdid" combodatacol="cdnm"/>
  91. <Cell col="5" displaytype="combo" edittype="combo" text="bind:etcitemcnts" combodataset="ds_init_combobscdlst_C07" combocodecol="cdid" combodatacol="cdnm"/>
  92. <Cell col="6" displaytype="text" edittype="text" text="bind:etcitemcnts2" editlimit="50"/>
  93. <Cell col="7" displaytype="checkbox" edittype="checkbox" text="bind:useyn"/>
  94. </Band>
  95. </Format>
  96. </Formats>
  97. </Grid>
  98. <Shape id="line2" class="line_10" linetype="horizontal" position="absolute 601 71 1195 75" style="" anchor="default"/>
  99. <Button id="button2" class="btn2" position="absolute 484 50 537 69" style="" text="행추가" onclick="group1_button2_onclick"/>
  100. <Button id="btn_grddel" class="btn2" position="absolute 540 50 593 69" style="" text="행삭제" onclick="group1_btn_grddel_onclick"/>
  101. <Button id="button1" class="btn2" position="absolute 1060 50 1113 69" style="" text="행삭제" onclick="group1_button1_onclick"/>
  102. <Button id="btn_grdadd" class="btn2" position="absolute 1005 50 1058 69" style="" text="행추가" onclick="group1_btn_grdadd_onclick"/>
  103. <Button id="btn_fileupload" class="btn2" position="absolute 1115 50 1190 69" style="" text="파일업로드" onclick="group1_btn_fileupload_onclick"/>
  104. <CheckBox id="bool_pastdata" position="absolute 914 50 934 70" style="" text="" anchor="left bottom"/>
  105. <Static id="caption5" position="absolute 934 52 999 67" style="" text="과거DATA"/>
  106. </Layout>
  107. </Layouts>
  108. </Div>
  109. <Div id="grp_btn" position="absolute 0 757 1195 784" style="">
  110. <Layouts>
  111. <Layout>
  112. <Button id="btn_clear2" class="btn4" position="absolute 1067 5 1135 27" style="" text="초기화" onclick="grp_btn_btn_clear2_onclick"/>
  113. <Button id="btn_save2" class="btn4" position="absolute 1138 5 1194 27" style="" text="저장" onclick="grp_btn_btn_save2_onclick"/>
  114. <Button id="btn_save1" class="btn4" position="absolute 537 5 593 27" style="" text="저장" onclick="grp_btn_btn_save1_onclick"/>
  115. <Button id="btn_clear1" class="btn4" position="absolute 466 5 534 27" style="" text="초기화" onclick="grp_btn_btn_clear1_onclick"/>
  116. </Layout>
  117. </Layouts>
  118. </Div>
  119. </Layout>
  120. </Layouts>
  121. <Objects>
  122. <Dataset id="ds_main_bscdlstdtl" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  123. <ColumnInfo/>
  124. </Dataset>
  125. <Dataset id="ds_hidden_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  126. <ColumnInfo>
  127. <Column id="item" type="STRING" size="256"/>
  128. </ColumnInfo>
  129. </Dataset>
  130. <Dataset id="ds_init_selectinput_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  131. <ColumnInfo>
  132. <Column id="etcdetlnm" type="STRING" size="256"/>
  133. <Column id="etcdetlcd" type="STRING" size="256"/>
  134. </ColumnInfo>
  135. <Rows>
  136. <Row>
  137. <Col id="etcdetlnm"/>
  138. <Col id="etcdetlcd"/>
  139. </Row>
  140. </Rows>
  141. </Dataset>
  142. <Dataset id="ds_main_bscdlstmst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  143. <ColumnInfo>
  144. <Column id="clscd" type="STRING" size="256"/>
  145. <Column id="etccd" type="STRING" size="256"/>
  146. <Column id="etccdkey" type="STRING" size="256"/>
  147. <Column id="etcdetlnm" type="STRING" size="256"/>
  148. <Column id="useyn" type="STRING" size="256"/>
  149. </ColumnInfo>
  150. <Rows>
  151. <Row>
  152. <Col id="clscd"/>
  153. <Col id="etccd"/>
  154. <Col id="etccdkey"/>
  155. <Col id="etcdetlnm"/>
  156. <Col id="useyn"/>
  157. </Row>
  158. </Rows>
  159. </Dataset>
  160. <Dataset id="ds_init_selectinput" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  161. <ColumnInfo/>
  162. </Dataset>
  163. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  164. <ColumnInfo>
  165. <Column id="combobscdlst" type="STRING" size="256"/>
  166. </ColumnInfo>
  167. </Dataset>
  168. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  169. <ColumnInfo/>
  170. </Dataset>
  171. <Dataset id="ds_send_req_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  172. <ColumnInfo>
  173. <Column id="savedata" type="STRING" size="256"/>
  174. <Column id="clscd" type="STRING" size="256"/>
  175. <Column id="etccd" type="STRING" size="256"/>
  176. <Column id="etcdetlcd" type="STRING" size="256"/>
  177. </ColumnInfo>
  178. <Rows>
  179. <Row>
  180. <Col id="savedata"/>
  181. <Col id="clscd"/>
  182. <Col id="etccd"/>
  183. <Col id="etcdetlcd"/>
  184. </Row>
  185. </Rows>
  186. </Dataset>
  187. <Dataset id="ds_main_bscdlstmst" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  188. <ColumnInfo/>
  189. </Dataset>
  190. <Dataset id="ds_main_bscdlstdtl_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  191. <ColumnInfo>
  192. <Column id="clscd" type="STRING" size="256"/>
  193. <Column id="etccd" type="STRING" size="256"/>
  194. <Column id="etcdetlcd" type="STRING" size="256"/>
  195. <Column id="etcdetlcdkey" type="STRING" size="256"/>
  196. <Column id="etcdetlnm" type="STRING" size="256"/>
  197. <Column id="etcitemcnts" type="STRING" size="256"/>
  198. <Column id="etcitemcnts2" type="STRING" size="256"/>
  199. <Column id="useyn" type="STRING" size="256"/>
  200. </ColumnInfo>
  201. <Rows>
  202. <Row>
  203. <Col id="clscd"/>
  204. <Col id="etccd"/>
  205. <Col id="etcdetlcd"/>
  206. <Col id="etcdetlcdkey"/>
  207. <Col id="etcdetlnm"/>
  208. <Col id="etcitemcnts"/>
  209. <Col id="etcitemcnts2"/>
  210. <Col id="useyn"/>
  211. </Row>
  212. </Rows>
  213. </Dataset>
  214. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  215. <ColumnInfo>
  216. <Column id="clscd" type="STRING" size="256"/>
  217. <Column id="etccd" type="STRING" size="256"/>
  218. <Column id="useyn" type="STRING" size="256"/>
  219. </ColumnInfo>
  220. <Rows>
  221. <Row>
  222. <Col id="clscd"/>
  223. <Col id="etccd"/>
  224. </Row>
  225. </Rows>
  226. </Dataset>
  227. <Dataset id="ds_init_combobscdlst_C06" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  228. <Dataset id="ds_init_combobscdlst_C07" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  229. </Objects>
  230. <Bind>
  231. <BindItem id="item0" compid="group1.grp_sea.cmb_clscd" propid="value" datasetid="ds_send" columnid="clscd"/>
  232. <BindItem id="item1" compid="group1.bool_pastdata" propid="value" datasetid="ds_send" columnid="useyn"/>
  233. </Bind>
  234. <Script type="xscript4.0"><![CDATA[include "com_commonxp::comm_main.xjs";
  235. include "com_commodulexp::SSZFM00901.xjs";
  236. include "ast_tissuebankbasexp::tissuebankcombolist.xjs"; //yjh : 커밋
  237. var arErrorCode = new HashArray();
  238. //스크립트 시작 ***
  239. //전체에서 event와 src를 제외한 script 를 모두포함.
  240. /**
  241. * 콤보 초기화
  242. */
  243. function fGetPtcdInputInit(){
  244. var arrparm = [
  245. {dsNm: "ds_init_combobscdlst_C06", cdGrpId: "C06"}, // C06 구분
  246. {dsNm: "ds_init_combobscdlst_C07", cdGrpId: "C07"}
  247. ]; // C25 의료관리자 2011.1.19 cyw
  248. tbGetBscdList( arrparm );
  249. }
  250. /**==================================================================================================================
  251. @author : 손주연
  252. @version : 2007-04-18
  253. @desc : fExcelUpload 엑셀파일을 해당 그리드로 in
  254. @param : grid object
  255. *====================================================================================================================*/
  256. function fExcelUpload(grid: Grid) {
  257. if (utlf_isNull(grid)) {
  258. sysf_messageBox("grid is null!", "E999");
  259. return;
  260. }
  261. var dataset = eval(grid.binddataset);
  262. dataset.clearData();
  263. grdf_ImportExcel(dataset.name, 0, grid, 0);
  264. // grid.deleteRow(1);
  265. }
  266. /**
  267. * 분류구분 초기화
  268. */
  269. function fGetSelInputInit(){
  270. ds_send.setColumn( 0, "clscd", "00");
  271. ds_send.setColumn( 0, "etccd", "00");
  272. //var ret = submit("TRAVB00101");
  273. var oParam = {};
  274. oParam.id = "TRAVB00101";
  275. oParam.service = "tissuebankbaseapp.TissueBankBase";
  276. oParam.method = "reqGetBsCdList";
  277. oParam.inds = "req=ds_send";
  278. oParam.outds = "ds_init_selectinput_item=item";
  279. oParam.async = false;
  280. oParam.callback = "cf_TRAVB00101";
  281. tranf_submit(oParam);
  282. if(arErrorCode.pop("TRAVB00101") > -1) {
  283. ret = true;
  284. }
  285. else {
  286. ret = false;
  287. }
  288. group1.grp_sea.cmb_clscd.index = 0;
  289. group1.bool_pastdata.value = false;
  290. return ret;
  291. }
  292. function cf_TRAVB00101(sSvcId, nErrorCode, sErrorMsg) {
  293. arErrorCode.push(sSvcId, nErrorCode);
  294. }
  295. /**
  296. * 분류코드 리스트 조회
  297. */
  298. function fGetBsCdListMst(){
  299. // 분류구분에 따라 상세코드 타이틀 변경 및 콤보변경
  300. var XXX_defSize = 100;
  301. if (group1.grp_sea.cmb_clscd.value== "M") {
  302. group1.bool_pastdata.visible = false;
  303. group1.caption5.visible = false;
  304. group1.grd_detlcodelst.setFormatColProperty( 3, "size", 0);
  305. group1.grd_detlcodelst.setFormatColProperty( 4, "size", XXX_defSize);
  306. group1.grd_detlcodelst.setFormatColProperty( 5, "size", 0);
  307. } else if (group1.grp_sea.cmb_clscd.value== "P") {
  308. group1.bool_pastdata.visible = true;
  309. group1.caption5.visible = true;
  310. group1.bool_pastdata.selected = false;
  311. group1.grd_detlcodelst.setFormatColProperty( 3, "size", 0);
  312. group1.grd_detlcodelst.setFormatColProperty( 4, "size", 0);
  313. group1.grd_detlcodelst.setFormatColProperty( 5, "size", XXX_defSize);
  314. } else {
  315. group1.bool_pastdata.visible = false;
  316. group1.caption5.visible = false;
  317. group1.grd_detlcodelst.setFormatColProperty( 3, "size", XXX_defSize);
  318. group1.grd_detlcodelst.setFormatColProperty( 4, "size", 0);
  319. group1.grd_detlcodelst.setFormatColProperty( 5, "size", 0);
  320. }
  321. ds_main_bscdlstmst_item.clearData();
  322. ds_main_bscdlstdtl_item.clearData();
  323. //model.refresh();
  324. ds_send.setColumn( 0, "etccd", "");
  325. //var ret = submit("TRAVB00102");
  326. var oParam = {};
  327. oParam.id = "TRAVB00102";
  328. oParam.service = "tissuebankbaseapp.TissueBankBase";
  329. oParam.method = "reqGetBsCdList";
  330. oParam.inds = "req=ds_send";
  331. oParam.outds = "ds_main_bscdlstmst_item=item";
  332. oParam.async = false;
  333. oParam.callback = "cf_TRAVB00102";
  334. tranf_submit(oParam);
  335. if(arErrorCode.pop("TRAVB00102") > -1)
  336. ret = true;
  337. else
  338. ret = false;
  339. return ret;
  340. }
  341. function cf_TRAVB00102(sSvcId, nErrorCode, sErrorMsg) {
  342. arErrorCode.push(sSvcId, nErrorCode);
  343. }
  344. /**
  345. * 상세코드 리스트 조회
  346. */
  347. function fGetBsCdListDtl(){
  348. var idx = ds_main_bscdlstmst_item.rowposition;
  349. if( idx < 0) return ;
  350. ds_main_bscdlstdtl_item.clearData();
  351. trace('etccd: ' + ds_main_bscdlstmst_item.getColumn( idx, "etccd" ));
  352. ds_send.setColumn( 0, "etccd", ds_main_bscdlstmst_item.getColumn( idx, "etccd" ));
  353. var oParam = {};
  354. oParam.id = "TRAVB00103";
  355. oParam.service = "tissuebankbaseapp.TissueBankBase";
  356. oParam.method = "reqGetBsCdList";
  357. oParam.inds = "req=ds_send";
  358. oParam.outds = "ds_main_bscdlstdtl_item=item";
  359. oParam.async = false;
  360. oParam.callback = "cf_TRAVB00103";
  361. tranf_submit(oParam);
  362. if(arErrorCode.pop("TRAVB00103") > -1)
  363. ret = true;
  364. else
  365. ret = false;
  366. return ret;
  367. }
  368. function cf_TRAVB00103(sSvcId, nErrorCode, sErrorMsg) {
  369. arErrorCode.push(sSvcId, nErrorCode);
  370. }
  371. /**
  372. * 초기화
  373. */
  374. function fBscdmstclear(){
  375. ds_main_bscdlstmst_item.clearData();
  376. ds_main_bscdlstdtl_item.clearData();
  377. //model.refresh();
  378. }
  379. function fBscddtlclear(){
  380. ds_main_bscdlstdtl_item.clearData();
  381. //model.refresh();
  382. }
  383. /**
  384. * 분류코드 저장
  385. */
  386. function fSaveBsCdMst(){
  387. var updateDs = grdf_getGridUpdateData(group1.grd_etclst);
  388. if( updateDs.rowcount <= 0 )
  389. {
  390. alert("저장할 내역이 없습니다.");
  391. return ;
  392. }
  393. var rsv_cnt = ds_main_bscdlstmst_item.rowcount;
  394. for( var i = 0; i < rsv_cnt ; i++){
  395. if( ds_main_bscdlstmst_item.getColumn( i, "etccd" ) == "") {
  396. alert("분류코드의 코드값이 비어있습니다.");
  397. return ;
  398. }
  399. }
  400. var ret = false;
  401. if ( sysf_messageBox("분류코드정보를","Q002")==6 ) {
  402. var updateDs = grdf_getGridUpdateData(group1.grd_etclst);
  403. grdf_setStatusColumn(updateDs, "m");
  404. ds_send_req_savedata.copyData(updateDs);
  405. ds_send_req_savedata.setColumn( 0, "clscd", ds_send.getColumn(0, "clscd") );
  406. ds_send_req_savedata.setColumn( 0, "etcdetlcd", "-" );
  407. //ret = submit("TXAVB00101");
  408. var oParam = {};
  409. oParam.id = "TXAVB00101";
  410. oParam.service = "tissuebankbaseapp.TissueBankBase";
  411. oParam.method = "reqExeBaseCodeMst";
  412. oParam.inds = "req=ds_send_req_savedata";
  413. oParam.outds = "ds_hidden_item=item";
  414. oParam.async = false;
  415. oParam.callback = "cf_TXAVB00101";
  416. tranf_submit(oParam);
  417. if(arErrorCode.pop("TXAVB00101") > -1)
  418. ret = true;
  419. else
  420. ret = false;
  421. }
  422. return ret;
  423. }
  424. function cf_TXAVB00101(sSvcId, nErrorCode, sErrorMsg) {
  425. arErrorCode.push(sSvcId, nErrorCode);
  426. }
  427. /**
  428. * 상세코드 저장
  429. */
  430. function fSaveDetlCode(){
  431. var idx = ds_main_bscdlstmst_item.rowposition;
  432. if( idx < 0) return ;
  433. var updateDs = grdf_getGridUpdateData(group1.grd_detlcodelst);
  434. if( updateDs.rowcount <= 0)
  435. {
  436. alert("저장할 내역이 없습니다.");
  437. return ;
  438. }
  439. var rsv_cnt = ds_main_bscdlstdtl_item.rowcount;
  440. for( var i = 0; i < rsv_cnt ; i++){
  441. if( utlf_transNullToEmpty(ds_main_bscdlstdtl_item.getColumn( i, "etcdetlcd" )) == "") {
  442. alert("상세코드의 코드값이 비어있습니다.");
  443. return ;
  444. }
  445. }
  446. var ret = false;
  447. if ( sysf_messageBox("상세코드정보를","Q002")==6 ) {
  448. var updateDs = grdf_getGridUpdateData(group1.grd_detlcodelst);
  449. grdf_setStatusColumn(updateDs, "m");
  450. ds_send_req_savedata.copyData(updateDs);
  451. ds_send_req_savedata.setColumn( 0, "clscd", ds_send.getColumn(0, "clscd") );
  452. ds_send_req_savedata.setColumn( 0, "etccd", ds_main_bscdlstmst_item.getColumn( idx, "etccd" ) );
  453. //ret = submit("TXAVB00102");
  454. var oParam = {};
  455. oParam.id = "TXAVB00102";
  456. oParam.service = "tissuebankbaseapp.TissueBankBase";
  457. oParam.method = "reqExeBaseCodeDtl";
  458. oParam.inds = "req=ds_send_req_savedata";
  459. oParam.outds = "ds_hidden_item=item";
  460. oParam.async = false;
  461. oParam.callback = "cf_TXAVB00102";
  462. tranf_submit(oParam);
  463. if(arErrorCode.pop("TXAVB00102") > -1)
  464. ret = true;
  465. else
  466. ret = false;
  467. }
  468. return ret;
  469. }
  470. function cf_TXAVB00102(sSvcId, nErrorCode, sErrorMsg) {
  471. arErrorCode.push(sSvcId, nErrorCode);
  472. }
  473. //스크립트 끝
  474. function SMAVB00100_onload(obj:Form, e:LoadEventInfo) {
  475. frmf_initForm(obj);
  476. grdf_initGrid(group1.grd_detlcodelst);
  477. grdf_initGrid(group1.grd_etclst);
  478. //grdf_setGridSort(grd_XXX);
  479. //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
  480. grdf_setRowTypeIcon(group1.grd_detlcodelst, 0);
  481. grdf_setRowTypeIcon(group1.grd_etclst, 0);
  482. fGetPtcdInputInit();
  483. fGetSelInputInit();
  484. group1.grp_sea.btn_search.click();
  485. }
  486. function group1_grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo) {
  487. fGetBsCdListMst();
  488. }
  489. function group1_grd_etclst_oncelldblclick(obj:Grid, e:GridClickEventInfo) {
  490. fGetBsCdListDtl();
  491. }
  492. // function group1_grd_detlcodelst_onentercell {
  493. //
  494. // if( group1.grd_detlcodelst.colType(group1.grd_detlcodelst.col) == "input" ){
  495. // group1.grd_detlcodelst.editCell();
  496. // }
  497. //
  498. // }
  499. function group1_grd_detlcodelst_onkeydown(obj:Grid, e:KeyEventInfo) {
  500. if( e.keycode == 13 ) {
  501. if( obj.currentcol == 1) {
  502. group1.grd_detlcodelst.setCellPos(2);
  503. group1.grd_detlcodelst.showEditor();
  504. }
  505. else if( obj.currentcol == 2 ){
  506. var row = ds_main_bscdlstdtl_item.addRow();
  507. group1.grd_detlcodelst.setCellPos(1);
  508. group1.grd_detlcodelst.showEditor();
  509. }
  510. }
  511. }
  512. function group1_button2_onclick(obj:Button, e:ClickEventInfo) {
  513. var row = ds_main_bscdlstmst_item.addRow();
  514. group1.grd_etclst.setCellPos(1);
  515. group1.grd_etclst.showEditor();
  516. }
  517. function group1_btn_grddel_onclick(obj:Button, e:ClickEventInfo) {
  518. dsf_deleteSelectedRows(group1.grd_etclst, true);
  519. }
  520. function group1_button1_onclick(obj:Button, e:ClickEventInfo) {
  521. dsf_deleteSelectedRows(group1.grd_detlcodelst, true);
  522. }
  523. function group1_btn_grdadd_onclick(obj:Button, e:ClickEventInfo) {
  524. var row = ds_main_bscdlstdtl_item.addRow();
  525. group1.grd_detlcodelst.setCellPos(1);
  526. group1.grd_detlcodelst.showEditor();
  527. }
  528. function group1_btn_fileupload_onclick(obj:Button, e:ClickEventInfo) {
  529. fExcelUpload(group1.grd_detlcodelst);
  530. }
  531. function grp_btn_btn_clear2_onclick(obj:Button, e:ClickEventInfo) {
  532. fBscddtlclear();
  533. }
  534. function grp_btn_btn_save2_onclick(obj:Button, e:ClickEventInfo) {
  535. if( fSaveDetlCode() == true ){
  536. fGetBsCdListDtl();
  537. }
  538. }
  539. function grp_btn_btn_save1_onclick(obj:Button, e:ClickEventInfo) {
  540. if( fSaveBsCdMst() == true ){
  541. fGetBsCdListMst();
  542. }
  543. }
  544. function grp_btn_btn_clear1_onclick(obj:Button, e:ClickEventInfo) {
  545. fBscdmstclear();
  546. }
  547. function group1_grp_sea_cmb_clscd_onitemchanged(obj:Combo, e:ItemChangeEventInfo){
  548. fGetBsCdListMst();
  549. }
  550. ]]></Script>
  551. </Form>
  552. </FDL>