SMAVB00400_묶음코드관리.xfdl 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAVB00400" position="absolute 0 0 1199 788" titletext="조직은행 묶음코드관리" onload="SMAVB00400_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 167 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" anchor="default">
  18. <Layouts>
  19. <Layout>
  20. <Shape id="line13" class="line_4" linetype="vertical" position="absolute 1107 7 1110 29" style="" anchor="default"/>
  21. <Button id="btn_search" class="btn1" position="absolute 1123 7 1179 29" style="" text="조회" onclick="group1_grp_sea_btn_search_onclick" anchor="default"/>
  22. <Static id="caption2" class="search_name" position="absolute 15 9 105 26" style="" text="묶음코드 :" anchor="default"/>
  23. <Static id="caption5" class="search_name" position="absolute 195 9 285 26" style="" text="묶 음 명 :" anchor="default"/>
  24. <Edit id="ipt_partnm" class="input_search" position="absolute 280 8 480 27" style="" anchor="default" onkeydown="group1_grp_sea_ipt_partnm_onkeydown"/>
  25. <Edit id="ipt_partcd" class="input_search" position="absolute 103 8 173 27" style="" anchor="default" onkeydown="group1_grp_sea_ipt_partcd_onkeydown"/>
  26. </Layout>
  27. </Layouts>
  28. </Div>
  29. <Static id="caption3" class="tit_2" position="absolute 5 54 83 72" style="" text="묶음코드" anchor="default"/>
  30. <Shape id="line1" class="line_10" linetype="horizontal" position="absolute 0 71 594 75" style="" anchor="default"/>
  31. <Grid id="grd_bdllst" binddataset="ds_main_bdcdlstmst_item" position="absolute 0 74 594 737" style="" oncelldblclick="group1_grd_bdllst_oncelldblclick" anchor="default">
  32. <Formats>
  33. <Format id="default">
  34. <Columns>
  35. <Column size="24"/>
  36. <Column size="100"/>
  37. <Column size="373"/>
  38. <Column size="99"/>
  39. </Columns>
  40. <Rows>
  41. <Row size="24" band="head"/>
  42. <Row size="24"/>
  43. </Rows>
  44. <Band id="head">
  45. <Cell/>
  46. <Cell col="1" text="묶음코드"/>
  47. <Cell col="2" text="묶음코드명"/>
  48. <Cell col="3" text="적용여부"/>
  49. </Band>
  50. <Band id="body">
  51. <Cell/>
  52. <Cell col="1" displaytype="text" edittype="text" text="bind:bdlcd" editlimit="10"/>
  53. <Cell col="2" displaytype="text" edittype="text" text="bind:bdlnm" editlimit="50"/>
  54. <Cell col="3" displaytype="checkbox" edittype="checkbox" text="bind:useyn" expr="expr:(useyn == 'Y' || useyn == '1') ? '1' : '0'"/>
  55. </Band>
  56. </Format>
  57. </Formats>
  58. </Grid>
  59. <Static id="caption4" class="tit_2" position="absolute 606 54 684 72" style="" text="상세코드" anchor="default"/>
  60. <Grid id="grd_detlcodelst" binddataset="ds_main_bdcdlstdtl_item" position="absolute 600 74 1194 737" style="" anchor="default" autofittype="col">
  61. <Formats>
  62. <Format id="default">
  63. <Columns>
  64. <Column size="24"/>
  65. <Column size="0"/>
  66. <Column size="80"/>
  67. <Column size="0"/>
  68. <Column size="280"/>
  69. <Column size="0"/>
  70. <Column size="77"/>
  71. <Column size="50"/>
  72. <Column size="80"/>
  73. </Columns>
  74. <Rows>
  75. <Row size="24" band="head"/>
  76. <Row size="24"/>
  77. </Rows>
  78. <Band id="head">
  79. <Cell/>
  80. <Cell col="1" text="밴드M"/>
  81. <Cell col="2" text="밴드"/>
  82. <Cell col="3" text="상세코드"/>
  83. <Cell col="4" text="상세코드명"/>
  84. <Cell col="5" text="구분M"/>
  85. <Cell col="6" text="구분"/>
  86. <Cell col="7" text="수량"/>
  87. <Cell col="8" text="적용여부"/>
  88. </Band>
  89. <Band id="body">
  90. <Cell/>
  91. <Cell col="1" text="bind:bandcd"/>
  92. <Cell col="2" displaytype="combo" edittype="combo" text="bind:bandmcd" combodataset="ds_init_combobscdlst_C04" combocodecol="cdid" combodatacol="cdnm"/>
  93. <Cell col="3" text="bind:banddcd"/>
  94. <Cell col="4" text="bind:banddnm" editlimit="50"/>
  95. <Cell col="5" text="bind:gbmcd"/>
  96. <Cell col="6" displaytype="combo" edittype="none" text="bind:gbdcd" combodataset="ds_init_combobscdlst_C06" combocodecol="cdid" combodatacol="cdnm"/>
  97. <Cell col="7" displaytype="number" edittype="masknumber" text="bind:qty" mask="#,##0.##" editlimit="6"/>
  98. <Cell col="8" displaytype="checkbox" edittype="checkbox" text="bind:useyn" expr="expr:(useyn == 'Y' || useyn == '1') ? '1' : '0'"/>
  99. </Band>
  100. </Format>
  101. </Formats>
  102. </Grid>
  103. <Shape id="line2" class="line_10" linetype="horizontal" position="absolute 600 71 1194 75" style="" anchor="default"/>
  104. <Button id="button2" class="btn2" position="absolute 484 50 537 69" style="" text="행추가" onclick="group1_button2_onclick" anchor="default"/>
  105. <Button id="btn_grddel" class="btn2" position="absolute 540 50 593 69" style="" text="행삭제" onclick="group1_btn_grddel_onclick" anchor="default"/>
  106. <Button id="button1" class="btn2" position="absolute 1140 50 1193 69" style="" text="행삭제" onclick="group1_button1_onclick" anchor="default"/>
  107. <Button id="btn_grdadd" class="btn2" position="absolute 1085 50 1138 69" style="" text="행추가" onclick="group1_btn_grdadd_onclick" anchor="default"/>
  108. </Layout>
  109. </Layouts>
  110. </Div>
  111. <Div id="grp_btn" position="absolute 0 757 1194 784" style="">
  112. <Layouts>
  113. <Layout>
  114. <Button id="btn_clear2" class="btn4" position="absolute 1067 5 1135 27" style="" text="초기화" onclick="grp_btn_btn_clear2_onclick" anchor="default"/>
  115. <Button id="btn_save2" class="btn4" position="absolute 1138 5 1194 27" style="" text="저장" onclick="grp_btn_btn_save2_onclick" anchor="default"/>
  116. <Button id="btn_save1" class="btn4" position="absolute 537 5 593 27" style="" text="저장" onclick="grp_btn_btn_save1_onclick" anchor="default"/>
  117. <Button id="btn_clear1" class="btn4" position="absolute 466 5 534 27" style="" text="초기화" onclick="grp_btn_btn_clear1_onclick" anchor="default"/>
  118. </Layout>
  119. </Layouts>
  120. </Div>
  121. </Layout>
  122. </Layouts>
  123. <Objects>
  124. <Dataset id="ds_main_bdcdlstmst" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  125. <ColumnInfo/>
  126. </Dataset>
  127. <Dataset id="ds_main_bdcdlstmst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_bdcdlstmst_item_oncolumnchanged">
  128. <ColumnInfo>
  129. <Column id="bdlcd" type="STRING" size="256"/>
  130. <Column id="bdlnm" type="STRING" size="256"/>
  131. <Column id="useyn" type="STRING" size="256"/>
  132. </ColumnInfo>
  133. <Rows>
  134. <Row>
  135. <Col id="bdlcd"/>
  136. <Col id="bdlnm"/>
  137. <Col id="useyn"/>
  138. </Row>
  139. </Rows>
  140. </Dataset>
  141. <Dataset id="ds_main_bdcdlstdtl" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  142. <ColumnInfo/>
  143. </Dataset>
  144. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  145. <ColumnInfo/>
  146. </Dataset>
  147. <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  148. <ColumnInfo>
  149. <Column id="savedata" type="STRING" size="256"/>
  150. <Column id="bdlcd" type="STRING" size="256"/>
  151. <Column id="bandcd" type="STRING" size="256"/>
  152. </ColumnInfo>
  153. <Rows>
  154. <Row>
  155. <Col id="savedata"/>
  156. <Col id="bdlcd"/>
  157. <Col id="bandcd"/>
  158. </Row>
  159. </Rows>
  160. </Dataset>
  161. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  162. <ColumnInfo>
  163. <Column id="combobscdlst" type="STRING" size="256"/>
  164. </ColumnInfo>
  165. <Rows>
  166. <Row>
  167. <Col id="combobscdlst"/>
  168. </Row>
  169. </Rows>
  170. </Dataset>
  171. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  172. <ColumnInfo>
  173. <Column id="item" type="STRING" size="256"/>
  174. </ColumnInfo>
  175. <Rows>
  176. <Row>
  177. <Col id="item"/>
  178. </Row>
  179. </Rows>
  180. </Dataset>
  181. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  182. <ColumnInfo>
  183. <Column id="templst" type="STRING" size="256"/>
  184. </ColumnInfo>
  185. </Dataset>
  186. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  187. <ColumnInfo>
  188. <Column id="srchbdlcd" type="STRING" size="256"/>
  189. <Column id="srchbdlnm" type="STRING" size="256"/>
  190. <Column id="bdlcd" type="STRING" size="256"/>
  191. <Column id="bandcd" type="STRING" size="256"/>
  192. </ColumnInfo>
  193. <Rows>
  194. <Row>
  195. <Col id="srchbdlcd"/>
  196. <Col id="srchbdlnm"/>
  197. <Col id="bdlcd"/>
  198. <Col id="bandcd"/>
  199. </Row>
  200. </Rows>
  201. </Dataset>
  202. <Dataset id="ds_main_bdcdlstdtl_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_bdcdlstdtl_item_oncolumnchanged">
  203. <ColumnInfo>
  204. <Column id="bandcd" type="STRING" size="256"/>
  205. <Column id="bandmcd" type="STRING" size="256"/>
  206. <Column id="banddcd" type="STRING" size="256"/>
  207. <Column id="banddnm" type="STRING" size="256"/>
  208. <Column id="gbmcd" type="STRING" size="256"/>
  209. <Column id="gbdcd" type="STRING" size="256"/>
  210. <Column id="qty" type="STRING" size="256"/>
  211. <Column id="useyn" type="STRING" size="256"/>
  212. </ColumnInfo>
  213. <Rows>
  214. <Row>
  215. <Col id="bandcd"/>
  216. <Col id="bandmcd"/>
  217. <Col id="banddcd"/>
  218. <Col id="banddnm"/>
  219. <Col id="gbmcd"/>
  220. <Col id="gbdcd"/>
  221. <Col id="qty"/>
  222. <Col id="useyn"/>
  223. </Row>
  224. </Rows>
  225. </Dataset>
  226. <Dataset id="ds_hidden_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  227. <ColumnInfo>
  228. <Column id="item" type="STRING" size="256"/>
  229. </ColumnInfo>
  230. </Dataset>
  231. <Dataset id="ds_send_req_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  232. <ColumnInfo>
  233. <Column id="savedata" type="STRING" size="256"/>
  234. <Column id="clscd" type="STRING" size="256"/>
  235. <Column id="etccd" type="STRING" size="256"/>
  236. <Column id="etcdetlcd" type="STRING" size="256"/>
  237. </ColumnInfo>
  238. <Rows>
  239. <Row>
  240. <Col id="savedata"/>
  241. <Col id="clscd"/>
  242. <Col id="etccd"/>
  243. <Col id="etcdetlcd"/>
  244. </Row>
  245. </Rows>
  246. </Dataset>
  247. <Dataset id="ds_temp_templst_list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  248. <Dataset id="ds_init_combobscdlst_C04" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  249. <Dataset id="ds_init_combobscdlst_C06" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  250. </Objects>
  251. <Bind>
  252. <BindItem id="item0" compid="group1.grp_sea.ipt_partnm" propid="value" datasetid="ds_send" columnid="srchbdlnm"/>
  253. <BindItem id="item1" compid="group1.grp_sea.ipt_partcd" propid="value" datasetid="ds_send" columnid="srchbdlcd"/>
  254. </Bind>
  255. <Script type="xscript4.0"><![CDATA[include "com_commonxp::comm_main.xjs";
  256. include "ast_tissuebankbasexp::tissuebankcombolist.xjs"; //yjh : 커밋
  257. var arErrorCode = new HashArray();
  258. //스크립트 시작 ***
  259. //전체에서 event와 src를 제외한 script 를 모두포함.
  260. /**
  261. * 콤보 초기화
  262. */
  263. function fGetPtcdInputInit(){
  264. var arrparm = [
  265. {dsNm: "ds_init_combobscdlst_C04", cdGrpId: "C04"},
  266. {dsNm: "ds_init_combobscdlst_C06", cdGrpId: "C06"}
  267. ]; // C25 의료관리자 2011.1.19 cyw
  268. tbGetBscdList( arrparm );
  269. }
  270. /**
  271. * 묶음코드 리스트 조회
  272. */
  273. function fGetBdCdListMst(){
  274. ds_main_bdcdlstmst_item.clearData();
  275. ds_main_bdcdlstdtl_item.clearData();
  276. //model.refresh();
  277. ds_send.setColumn( 0, "bandcd", "-");
  278. //var ret = submit("TRAVB00401");
  279. var oParam = {};
  280. oParam.id = "TRAVB00401";
  281. oParam.service = "tissuebankbaseapp.TissueBankBndl";
  282. oParam.method = "reqGetBdCdList";
  283. oParam.inds = "req=ds_send";
  284. oParam.outds = "ds_main_bdcdlstmst_item=item";
  285. oParam.async = false;
  286. oParam.callback = "cf_TRAVB00401";
  287. tranf_submit(oParam);
  288. if(arErrorCode.pop("TRAVB00401") > -1)
  289. ret = true;
  290. else
  291. ret = false;
  292. return ret;
  293. }
  294. function cf_TRAVB00401(sSvcId, nErrorCode, sErrorMsg) {
  295. arErrorCode.push(sSvcId, nErrorCode);
  296. }
  297. /**
  298. * 상세코드 리스트 조회
  299. */
  300. function fGetBdCdListDtl(){
  301. var idx = ds_main_bdcdlstmst_item.rowposition;
  302. if( idx < 0) return ;
  303. ds_main_bdcdlstdtl_item.clearData();
  304. //model.refresh();
  305. ds_send.setColumn( 0, "bdlcd",ds_main_bdcdlstmst_item.getColumn( idx, "bdlcd" ) );
  306. ds_send.setColumn( 0, "bandcd", "" );
  307. //var ret = submit("TRAVB00402");
  308. var oParam = {};
  309. oParam.id = "TRAVB00402";
  310. oParam.service = "tissuebankbaseapp.TissueBankBndl";
  311. oParam.method = "reqGetBdCdList";
  312. oParam.inds = "req=ds_send";
  313. oParam.outds = "ds_main_bdcdlstdtl_item=item";
  314. oParam.async = false;
  315. oParam.callback = "cf_TRAVB00402";
  316. tranf_submit(oParam);
  317. if(arErrorCode.pop("TRAVB00402") > -1)
  318. ret = true;
  319. else
  320. ret = false;
  321. return ret;
  322. }
  323. function cf_TRAVB00402(sSvcId, nErrorCode, sErrorMsg) {
  324. arErrorCode.push(sSvcId, nErrorCode);
  325. }
  326. /**
  327. * 초기화
  328. */
  329. function fBdcdmstclear(){
  330. ds_main_bdcdlstmst_item.clearData();
  331. ds_main_bdcdlstdtl_item.clearData();
  332. //model.refresh();
  333. }
  334. function fBdcddtlclear(){
  335. ds_main_bdcdlstdtl_item.clearData();
  336. //model.refresh();
  337. }
  338. /**
  339. * 분류코드 저장
  340. */
  341. function fSaveBdCdMst(){
  342. var updateDs = grdf_getGridUpdateData(group1.grd_bdllst);
  343. if( updateDs.rowcount <= 0)
  344. {
  345. alert("저장할 내역이 없습니다.");
  346. return ;
  347. }
  348. var rsv_cnt = ds_main_bdcdlstmst_item.rowcount;
  349. for( var i = 0; i < rsv_cnt ; i++){
  350. if( ds_main_bdcdlstmst_itemgroup1.getColumn( i, "bdlcd" ) == "") {
  351. alert("묶음코드의 코드값이 비어있습니다.");
  352. return ;
  353. }
  354. }
  355. var ret = false;
  356. if ( sysf_messageBox("묶음코드정보를","Q002")==6 ) {
  357. var updateDs = grdf_getGridUpdateData(group1.grd_bdllst);
  358. grdf_setStatusColumn(updateDs, "m");
  359. ds_send_req_savedata.copyData(updateDs);
  360. ds_send_req_savedata.setColumn( 0, "bandcd", "-");
  361. //ret = submit("TXAVB00401");
  362. var oParam = {};
  363. oParam.id = "TXAVB00401";
  364. oParam.service = "tissuebankbaseapp.TissueBankBndl";
  365. oParam.method = "reqExeBndlCodeMst";
  366. oParam.inds = "req=ds_send_req_savedata";
  367. oParam.outds = "ds_hidden_item=item";
  368. oParam.async = false;
  369. oParam.callback = "cf_TXAVB00401";
  370. tranf_submit(oParam);
  371. if(arErrorCode.pop("TXAVB00401") > -1)
  372. ret = true;
  373. else
  374. ret = false;
  375. }
  376. return ret;
  377. }
  378. function cf_TXAVB00401(sSvcId, nErrorCode, sErrorMsg) {
  379. arErrorCode.push(sSvcId, nErrorCode);
  380. }
  381. /**
  382. * 상세코드 저장
  383. */
  384. function fSaveDetlCode(){
  385. // 저장할 건이 존재하는지 체크
  386. var idx = ds_main_bdcdlstmst_item.rowposition;
  387. if( idx < 0) return ;
  388. var updateDs = grdf_getGridUpdateData(group1.grd_detlcodelst);
  389. if( updateDs.rowcount <= 0)
  390. {
  391. alert("저장할 내역이 없습니다.");
  392. return ;
  393. }
  394. // 저장할지 확인후 저장
  395. var ret = false;
  396. if ( sysf_messageBox("상세코드정보를","Q002")==6 ) {
  397. var updateDs = grdf_getGridUpdateData(group1.grd_detlcodelst);
  398. grdf_setStatusColumn(updateDs, "m");
  399. ds_send_req_savedata.copyData(updateDs);
  400. ds_send_req_savedata.setColumn( 0, "bdlcd", ds_main_bdcdlstmst_item.getColumn( idx, "bdlcd") );
  401. //ret = submit("TXAVB00402");
  402. var oParam = {};
  403. oParam.id = "TXAVB00402";
  404. oParam.service = "tissuebankbaseapp.TissueBankBndl";
  405. oParam.method = "reqExeBndlCodeDtl";
  406. oParam.inds = "req=ds_send_req_savedata";
  407. oParam.outds = "ds_hidden_item=item";
  408. oParam.async = false;
  409. oParam.callback = "cf_TXAVB00402";
  410. tranf_submit(oParam);
  411. if(arErrorCode.pop("TXAVB00402") > -1)
  412. ret = true;
  413. else
  414. ret = false;
  415. }
  416. return ret;
  417. }
  418. function cf_TXAVB00402(sSvcId, nErrorCode, sErrorMsg) {
  419. arErrorCode.push(sSvcId, nErrorCode);
  420. }
  421. //스크립트 끝
  422. function SMAVB00400_onload(obj:Form, e:LoadEventInfo) {
  423. frmf_initForm(obj);
  424. grdf_initGrid(group1.grd_bdllst);
  425. grdf_initGrid(group1.grd_detlcodelst);
  426. //grdf_setGridSort(grd_XXX);
  427. grdf_setRowTypeIcon(group1.grd_bdllst, 0);
  428. grdf_setRowTypeIcon(group1.grd_detlcodelst, 0);
  429. fGetPtcdInputInit();
  430. fGetBdCdListMst();
  431. }
  432. function group1_grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo) {
  433. fGetBdCdListMst();
  434. }
  435. function group1_grp_sea_ipt_partnm_onkeydown(obj:Edit, e:KeyEventInfo) {
  436. if(e.keycode == 13){
  437. obj.updateToDataset();
  438. group1.grp_sea.btn_search.click();
  439. }
  440. }
  441. function group1_grp_sea_ipt_partcd_onkeydown(obj:Edit, e:KeyEventInfo) {
  442. if(e.keycode == 13){
  443. obj.updateToDataset();
  444. group1.grp_sea.btn_search.click();
  445. }
  446. }
  447. function group1_grd_bdllst_oncelldblclick(obj:Grid, e:GridClickEventInfo) {
  448. fGetBdCdListDtl();
  449. }
  450. function group1_button2_onclick(obj:Button, e:ClickEventInfo) {
  451. var row = ds_main_bdcdlstmst_item.addRow();
  452. group1.grd_bdllst.setCellPos(1);
  453. group1.grd_bdllst.showEditor();
  454. }
  455. function group1_btn_grddel_onclick(obj:Button, e:ClickEventInfo) {
  456. dsf_deleteSelectedRows(group1.grd_bdllst, true);
  457. }
  458. function group1_button1_onclick(obj:Button, e:ClickEventInfo) {
  459. dsf_deleteSelectedRows(group1.grd_detlcodelst, true);
  460. }
  461. function group1_btn_grdadd_onclick(obj:Button, e:ClickEventInfo) {
  462. frmf_clearParameter("SPAVBA00100_PARAM1");
  463. frmf_setParameter ("SPAVBA00100_PARAM1", "F");
  464. // 선택화면 Call
  465. frmf_modal("SPAVB00100", "SPAVB00100", "", "", "", "", "", "", "", "", "", "", "M");
  466. // 정상인 경우 가져온값 setting
  467. if (ds_temp.getColumn(0, "okflag") == "ok") {
  468. // 가져온값 건수 반복
  469. var idx = ds_temp_templst_list.rowcount;
  470. var maxrow = ds_main_bdcdlstdtl_item.rowcount;
  471. for (var i = 0; i < idx; i++) {
  472. // 동일한 값이 없는 경우 추가
  473. var srcEtcdetlnm = ds_temp_templst_list.getColumn(i, "etcdetlnm");
  474. if (ds_main_bdcdlstdtl_item.getCaseCount("banddnm == '" + srcEtcdetlnm + "'") == 0) {
  475. maxrow = ds_main_bdcdlstdtl_item.addRow();
  476. ds_main_bdcdlstdtl_item.setColumn( maxrow, "bandcd", "C04"); // 밴드코드
  477. ds_main_bdcdlstdtl_item.setColumn( maxrow, "bandmcd", ds_temp_templst_list.getColumn(i, "etccd") ); // 밴드M코드
  478. ds_main_bdcdlstdtl_item.setColumn( maxrow, "banddcd", ds_temp_templst_list.getColumn(i, "etcdetlcd") ); // 밴드D코드
  479. ds_main_bdcdlstdtl_item.setColumn( maxrow, "banddnm", ds_temp_templst_list.getColumn(i, "etcdetlnm") ); // 밴드D명
  480. ds_main_bdcdlstdtl_item.setColumn( maxrow, "gbmcd", "C06" ); // 구분M코드
  481. ds_main_bdcdlstdtl_item.setColumn( maxrow, "gbdcd", ds_temp_templst_list.getColumn(i, "etcitemcnts") ); // 구분D코드
  482. ds_main_bdcdlstdtl_item.setColumn( maxrow, "qty", 1 ); // 수량
  483. ds_main_bdcdlstdtl_item.setColumn( maxrow, "useyn", "1" ); //Y // 사용여부
  484. maxrow++;
  485. }
  486. }
  487. }
  488. // 불필요 Node 삭제
  489. ds_temp_okflag.clearData();
  490. ds_temp_templst_list.clearData();
  491. }
  492. function grp_btn_btn_clear2_onclick(obj:Button, e:ClickEventInfo) {
  493. fBdcddtlclear();
  494. }
  495. function grp_btn_btn_save2_onclick(obj:Button, e:ClickEventInfo) {
  496. if( fSaveDetlCode() == true ){
  497. fGetBdCdListDtl();
  498. }
  499. }
  500. function grp_btn_btn_save1_onclick(obj:Button, e:ClickEventInfo) {
  501. if( fSaveBdCdMst() == true ){
  502. fGetBdCdListMst();
  503. }
  504. }
  505. function grp_btn_btn_clear1_onclick(obj:Button, e:ClickEventInfo) {
  506. fBdcdmstclear();
  507. }
  508. function ds_main_bdcdlstmst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  509. {
  510. if(e.columnid == 'useyn'){
  511. var value = (e.newvalue == 'Y' || e.newvalue == '1') ? 'Y' : 'N';
  512. obj.setColumn(e.row, 'useyn', value);
  513. }
  514. }
  515. function ds_main_bdcdlstdtl_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  516. {
  517. if(e.columnid == 'useyn'){
  518. var value = (e.newvalue == 'Y' || e.newvalue == '1') ? 'Y' : 'N';
  519. obj.setColumn(e.row, 'useyn', value);
  520. }
  521. }
  522. ]]></Script>
  523. </Form>
  524. </FDL>