SMAVB00200_부위코드관리.xfdl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAVB00200" position="absolute 0 0 1280 1024" titletext="부위코드 관리" onload="SMAVB00200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="grp_biz" scrollbars="autoboth" position="absolute 0 13 1195 757" style="">
  8. <Layouts>
  9. <Layout>
  10. <Div id="grp_sea" position="absolute 0 10 1194 45" style="align: top;" class="div_SA">
  11. <Layouts>
  12. <Layout width="1194" height="35">
  13. <Shape id="line13" class="line_4" linetype="vertical" position="absolute 1107 7 1110 29" style="" anchor="default"/>
  14. <Button id="btn_sea" class="btn1" position="absolute 1125 7 1181 29" style="" text="조회" onclick="grp_biz_grp_sea_btn_sea_onclick" anchor="default"/>
  15. <Static id="caption2" class="search_name" position="absolute 15 9 89 26" style="" text="부위코드 :" anchor="default"/>
  16. <Edit id="ipt_partcd" class="input_search" position="absolute 95 8 165 27" style="" anchor="default" onkeydown="grp_biz_grp_sea_ipt_partcd_onkeydown"/>
  17. <Static id="caption3" class="search_name" position="absolute 195 9 269 26" style="" text="부 위 명 :" anchor="default"/>
  18. <Edit id="ipt_partnm" class="input_search" position="absolute 272 8 472 27" style="" anchor="default" onkeydown="grp_biz_grp_sea_ipt_partnm_onkeydown"/>
  19. </Layout>
  20. </Layouts>
  21. </Div>
  22. <Button id="btn_gedadd" class="btn2" position="absolute 1084 50 1137 69" style="" text="행추가" onclick="grp_biz_btn_gedadd_onclick"/>
  23. <Button id="btn_grddel" class="btn2" position="absolute 1141 50 1194 69" style="" text="행삭제" onclick="grp_biz_btn_grddel_onclick"/>
  24. <Static id="caption1" class="tit_2" position="absolute 5 57 125 76" style="" text="부위코드관리"/>
  25. <Shape id="line1" class="line_10" linetype="horizontal" position="absolute 3 74 1194 78" style="" anchor="default"/>
  26. <Grid id="grd_ptcdlst" binddataset="ds_main_ptcdlst_item" position="absolute 0 90 1191 740" style="" ontextchanged="grp_biz_grd_ptcdlst_ontextchanged">
  27. <Formats>
  28. <Format id="default">
  29. <Columns>
  30. <Column size="24"/>
  31. <Column size="80"/>
  32. <Column size="300"/>
  33. <Column size="150"/>
  34. <Column size="0"/>
  35. <Column size="100"/>
  36. <Column size="0"/>
  37. <Column size="100"/>
  38. <Column size="70"/>
  39. <Column size="150"/>
  40. </Columns>
  41. <Rows>
  42. <Row size="24" band="head"/>
  43. <Row size="24"/>
  44. </Rows>
  45. <Band id="head">
  46. <Cell/>
  47. <Cell col="1" text="부위코드 "/>
  48. <Cell col="2" text="부위명"/>
  49. <Cell col="3" text="부위약어"/>
  50. <Cell col="4" text="조직코드M"/>
  51. <Cell col="5" text="조직"/>
  52. <Cell col="6" text="조직구분M"/>
  53. <Cell col="7" text="조직구분"/>
  54. <Cell col="8" text="사용여부"/>
  55. <Cell col="9" text="수정일자"/>
  56. </Band>
  57. <Band id="body">
  58. <Cell celltype="head"/>
  59. <Cell col="1" displaytype="text" edittype="text" text="bind:partcode"/>
  60. <Cell col="2" displaytype="text" edittype="text" text="bind:partname" editlimit="100"/>
  61. <Cell col="3" displaytype="text" edittype="text" text="bind:partaname" editlimit="50"/>
  62. <Cell col="4" text="bind:tissuemcd"/>
  63. <Cell col="5" displaytype="combo" edittype="combo" text="bind:tissuedcd" combodataset="ds_init_combobscdlst_C01" combocodecol="cdid" combodatacol="cdnm"/>
  64. <Cell col="6" text="bind:tissuegbdcd"/>
  65. <Cell col="7" displaytype="combo" edittype="combo" text="bind:useyn" combodataset="ds_init_combobscdlst_C05" combocodecol="cdid" combodatacol="cdnm"/>
  66. <Cell col="8" displaytype="checkbox" edittype="checkbox" text="bind:useyn" expr="expr:(useyn == 'Y' || useyn == '1') ? '1' : '0'"/>
  67. <Cell col="9" displaytype="date" edittype="date" text="bind:lastupdtdt" calendardisplaynulltype="nulltext"/>
  68. </Band>
  69. </Format>
  70. </Formats>
  71. </Grid>
  72. </Layout>
  73. </Layouts>
  74. </Div>
  75. <Div id="grp_btn" position="absolute 0 757 1195 784" style="">
  76. <Layouts>
  77. <Layout>
  78. <Button id="btn_save" class="btn4" position="absolute 1138 5 1194 27" style="" text="저장" onclick="grp_btn_btn_save_onclick"/>
  79. </Layout>
  80. </Layouts>
  81. </Div>
  82. <Div id="grp_tle" position="absolute 0 0 1195 25" style="">
  83. <Layouts>
  84. <Layout>
  85. <Static id="caption6" class="tit_1" position="absolute 0 0 200 23" style="" text="조직은행 부위코드 관리"/>
  86. </Layout>
  87. </Layouts>
  88. </Div>
  89. </Layout>
  90. </Layouts>
  91. <Objects>
  92. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  93. <ColumnInfo>
  94. <Column id="item" type="STRING" size="256"/>
  95. </ColumnInfo>
  96. </Dataset>
  97. <Dataset id="ds_main_ptcdlst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_ptcdlst_item_oncolumnchanged">
  98. <ColumnInfo>
  99. <Column id="partcode" type="STRING" size="256"/>
  100. <Column id="partname" type="STRING" size="256"/>
  101. <Column id="partaname" type="STRING" size="256"/>
  102. <Column id="tissuemcd" type="STRING" size="256"/>
  103. <Column id="tissuedcd" type="STRING" size="256"/>
  104. <Column id="tissuegbmcd" type="STRING" size="256"/>
  105. <Column id="tissuegbdcd" type="STRING" size="256"/>
  106. <Column id="useyn" type="STRING" size="256"/>
  107. <Column id="lastupdtdt" type="STRING" size="256"/>
  108. </ColumnInfo>
  109. <Rows>
  110. <Row>
  111. <Col id="partcode"/>
  112. <Col id="partname"/>
  113. <Col id="partaname"/>
  114. <Col id="tissuemcd"/>
  115. <Col id="tissuedcd"/>
  116. <Col id="tissuegbmcd"/>
  117. <Col id="tissuegbdcd"/>
  118. <Col id="useyn"/>
  119. <Col id="lastupdtdt"/>
  120. </Row>
  121. </Rows>
  122. </Dataset>
  123. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  124. <ColumnInfo/>
  125. </Dataset>
  126. <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  127. <ColumnInfo>
  128. <Column id="savedata" type="STRING" size="256"/>
  129. </ColumnInfo>
  130. <Rows>
  131. <Row>
  132. <Col id="savedata"/>
  133. </Row>
  134. </Rows>
  135. </Dataset>
  136. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  137. <ColumnInfo>
  138. <Column id="combobscdlst" type="STRING" size="256"/>
  139. </ColumnInfo>
  140. <Rows>
  141. <Row>
  142. <Col id="combobscdlst"/>
  143. </Row>
  144. </Rows>
  145. </Dataset>
  146. <Dataset id="ds_main_ptcdlst" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  147. <ColumnInfo/>
  148. </Dataset>
  149. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  150. <ColumnInfo>
  151. <Column id="srchpartcode" type="STRING" size="256"/>
  152. <Column id="srchpartname" type="STRING" size="256"/>
  153. </ColumnInfo>
  154. <Rows>
  155. <Row>
  156. <Col id="srchpartcode"/>
  157. <Col id="srchpartname"/>
  158. </Row>
  159. </Rows>
  160. </Dataset>
  161. <Dataset id="ds_hidden_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  162. <ColumnInfo>
  163. <Column id="item" type="STRING" size="256"/>
  164. </ColumnInfo>
  165. </Dataset>
  166. <Dataset id="ds_send_req_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  167. <ColumnInfo>
  168. <Column id="savedata" type="STRING" size="256"/>
  169. <Column id="clscd" type="STRING" size="256"/>
  170. <Column id="etccd" type="STRING" size="256"/>
  171. <Column id="etcdetlcd" type="STRING" size="256"/>
  172. </ColumnInfo>
  173. <Rows>
  174. <Row>
  175. <Col id="savedata"/>
  176. <Col id="clscd"/>
  177. <Col id="etccd"/>
  178. <Col id="etcdetlcd"/>
  179. </Row>
  180. </Rows>
  181. </Dataset>
  182. <Dataset id="ds_tmp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  183. <Dataset id="ds_init_combobscdlst_C01" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  184. <Dataset id="ds_init_combobscdlst_C05" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  185. </Objects>
  186. <Bind>
  187. <BindItem id="item0" compid="grp_biz.grp_sea.ipt_partcd" propid="value" datasetid="ds_send" columnid="srchpartcode"/>
  188. <BindItem id="item1" compid="grp_biz.grp_sea.ipt_partnm" propid="value" datasetid="ds_send" columnid="srchpartname"/>
  189. </Bind>
  190. <Script type="xscript4.0"><![CDATA[include "com_commonxp::comm_main.xjs";
  191. include "com_commodulexp::SSZFM00901.xjs";
  192. include "ast_tissuebankbasexp::tissuebankcombolist.xjs"; //yjh : 커밋
  193. var arErrorCode = new HashArray();
  194. //스크립트 시작 ***
  195. //전체에서 event와 src를 제외한 script 를 모두포함.
  196. /**
  197. * 콤보 초기화
  198. */
  199. function fGetPtcdInputInit(){
  200. var arrparm = [
  201. {dsNm: "ds_init_combobscdlst_C01", cdGrpId: "C01"},
  202. {dsNm: "ds_init_combobscdlst_C05", cdGrpId: "C05"}
  203. ]; // C25 의료관리자 2011.1.19 cyw
  204. tbGetBscdList( arrparm );
  205. }
  206. /**
  207. * 부위코드 리스트 조회
  208. */
  209. function fGetPartCodeList(){
  210. ds_main_ptcdlst_item.clearData();
  211. dsf_createDsRow('ds_TRAVB00201', [
  212. { col: 'srchpartcode', type: 'string', size: 256, val: '' },
  213. { col: 'srchpartname', type: 'string', size: 256, val: '' },
  214. { col: 'srchuseyn', type: 'string', size: 256, val: '' }
  215. ], false);
  216. ds_TRAVB00201.copyRow(0, ds_send, 0);
  217. var oParam = {};
  218. oParam.id = "TRAVB00201";
  219. oParam.service = "tissuebankbaseapp.TissueBankPart";
  220. oParam.method = "reqGetPtCdList";
  221. oParam.inds = "req=ds_TRAVB00201";
  222. oParam.outds = "ds_main_ptcdlst_item=item";
  223. oParam.async = false;
  224. oParam.callback = "cf_TRAVB00201";
  225. tranf_submit(oParam);
  226. if(arErrorCode.pop("TRAVB00201") > -1)
  227. ret = true;
  228. else
  229. ret = false;
  230. return ret;
  231. }
  232. function cf_TRAVB00201(sSvcId, nErrorCode, sErrorMsg) {
  233. arErrorCode.push(sSvcId, nErrorCode);
  234. }
  235. /**
  236. * 부위코드 저장
  237. */
  238. function fSaveExer() {
  239. var dsUpdate = grdf_getGridUpdateData(grp_biz.grd_ptcdlst, "all");
  240. grdf_setStatusColumn(dsUpdate, "m");
  241. ds_tmp.copyData(dsUpdate,true);
  242. if(ds_tmp.rowcount < 1)
  243. {
  244. alert("저장할 내역이 없습니다.");
  245. return ;
  246. }
  247. var rsv_cnt = ds_main_ptcdlst_item.rowcount;
  248. for( var i = 0; i < rsv_cnt ; i++){
  249. if( utlf_transNullToEmpty(ds_main_ptcdlst_item.getColumn( i, "partcode" )) == "") {
  250. alert("부위코드의 코드값이 비어있습니다.");
  251. return ;
  252. }
  253. }
  254. var ret = false;
  255. if ( sysf_messageBox("부위코드정보를","Q002") == 6 ) {
  256. //ds_send_req.setColumn( 0, "savedata", grp_biz.grd_ptcdlst.getUpdateData());
  257. var updateDs = grdf_getGridUpdateData(grp_biz.grd_ptcdlst);
  258. grdf_setStatusColumn(updateDs, "m");
  259. ds_send_req_savedata.copyData(updateDs);
  260. //ret = submit("TXAVB00201");
  261. var oParam = {};
  262. oParam.id = "TXAVB00201";
  263. oParam.service = "tissuebankbaseapp.TissueBankPart";
  264. oParam.method = "reqExePartCode";
  265. oParam.inds = "req=ds_send_req_savedata";
  266. oParam.outds = "ds_hidden_item=item";
  267. oParam.async = false;
  268. oParam.callback = "cf_TXAVB00201";
  269. tranf_submit(oParam);
  270. if(arErrorCode.pop("TXAVB00201") > -1)
  271. ret = true;
  272. else
  273. ret = false;
  274. }
  275. return ret;
  276. }
  277. function cf_TXAVB00201(sSvcId, nErrorCode, sErrorMsg) {
  278. arErrorCode.push(sSvcId, nErrorCode);
  279. }
  280. //스크립트 끝
  281. function SMAVB00200_onload(obj:Form, e:LoadEventInfo) {
  282. frmf_initForm(obj);
  283. grdf_initGrid(grp_biz.grd_ptcdlst);
  284. //grdf_setGridSort(grd_XXX);
  285. grdf_setRowTypeIcon(grp_biz.grd_ptcdlst, 0);
  286. fGetPtcdInputInit();
  287. //submit("TRAVB00201");
  288. var oParam = {};
  289. oParam.id = "TRAVB00201";
  290. oParam.service = "tissuebankbaseapp.TissueBankPart";
  291. oParam.method = "reqGetPtCdList";
  292. oParam.inds = "req=ds_send";
  293. oParam.outds = "ds_main_ptcdlst_item=item";
  294. oParam.async = false;
  295. tranf_submit(oParam);
  296. }
  297. function grp_biz_grp_sea_btn_sea_onclick(obj:Button, e:ClickEventInfo) {
  298. fGetPartCodeList();
  299. }
  300. function grp_biz_grp_sea_ipt_partcd_onkeydown(obj:Edit, e:KeyEventInfo) {
  301. if(e.keycode == 13){
  302. obj.updateToDataset();
  303. grp_biz.grp_sea.btn_sea.click();
  304. }
  305. }
  306. function grp_biz_grp_sea_ipt_partnm_onkeydown(obj:Edit, e:KeyEventInfo) {
  307. if(e.keycode == 13){
  308. obj.updateToDataset();
  309. grp_biz.grp_sea.btn_sea.click();
  310. }
  311. }
  312. function grp_biz_btn_gedadd_onclick(obj:Button, e:ClickEventInfo) {
  313. ds_main_ptcdlst_item.addRow();
  314. //var addRow = grp_biz.grd_ptcdlst.rows -1 ;
  315. //grp_biz.grd_ptcdlst.valueMatrix(addRow , grp_biz.grd_ptcdlst.colRef("tissuedcd")) = ds_init.getColumn(0, "combobscdlst");
  316. }
  317. function grp_biz_btn_grddel_onclick(obj:Button, e:ClickEventInfo) {
  318. dsf_deleteSelectedRows(grp_biz.grd_ptcdlst, true);
  319. }
  320. function grp_biz_grd_ptcdlst_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo) {
  321. var col = e.col;
  322. var row = e.row;
  323. if(col == grp_biz.grd_ptcdlst.getBindCellIndex("body", "partcode")) {
  324. var count = -1;
  325. var chkRow = 0;
  326. var partCd = ds_main_ptcdlst_item.getColumn( row,"partcode");
  327. //선행검사 중복체크
  328. while(chkRow >= 0) {
  329. chkRow = ds_main_ptcdlst_item.findRow( "partcode", partCd, chkRow + 1);
  330. count++;
  331. }
  332. if(count >= 2) {
  333. sysf_messageBox("부위코드가 ","E006");
  334. //model.resetInstanceNode(grp_biz.grd_ptcdlst.nodeset + "[" + row + "]");
  335. return;
  336. }
  337. }
  338. }
  339. function grp_btn_btn_save_onclick(obj:Button, e:ClickEventInfo) {
  340. if( fSaveExer() == true ){
  341. //submit("TRAVB00201");
  342. var oParam = {};
  343. oParam.id = "TRAVB00201";
  344. oParam.service = "tissuebankbaseapp.TissueBankPart";
  345. oParam.method = "reqGetPtCdList";
  346. oParam.inds = "req=ds_send";
  347. oParam.outds = "ds_main_ptcdlst_item=item";
  348. oParam.async = false;
  349. tranf_submit(oParam);
  350. }
  351. }
  352. function ds_main_ptcdlst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  353. {
  354. if(e.columnid == 'useyn'){
  355. var value = (e.newvalue == '1' || e.newvalue == 'Y') ? 'Y' : 'N';
  356. obj.setColumn(e.row, 'useyn', value);
  357. }
  358. }
  359. ]]></Script>
  360. </Form>
  361. </FDL>