SMAEB00302_진단예문관리.xfdl 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAEB00302" position="absolute 0 0 997 615" titletext="진단예문관리" oninit="SMAEB00302_oninit" onload="SMAEB00302_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="예문관리(진단)" position="absolute 0 0 160 25" align="align:center middle;" id="caption2" class="tit_1"/>
  8. <Div position="absolute 1 25 992 60" id="grp_sea" class="div_SA">
  9. <Layouts>
  10. <Layout>
  11. <Button position="absolute 923 7 979 29" id="button1" class="btn1" text="조회" anchor="default" onclick="grp_sea_button1_onclick"/>
  12. <Shape position="absolute 904 7 910 29" linetype="vertical" id="line13" class="line_4" anchor="default"/>
  13. <Radio id="rdo_comprod" taborder="1" columncount="0" rowcount="0" innerdataset="ds_init_rdo_comprod" codecolumn="cdid" datacolumn="cdnm" class="radio_search" position="absolute 714 5 908 30" anchor="default" visible="false"/>
  14. <cp_radioList id="rdo_m_comprod" taborder="2" scrollbars="none" position="absolute 8 8 108 28" style="background:transparent; " col="1" row="1"/>
  15. </Layout>
  16. </Layouts>
  17. </Div>
  18. <Div position="absolute 0 60 995 575" id="group1">
  19. <Layouts>
  20. <Layout>
  21. <Button position="absolute 328 17 381 36" id="button4" class="btn2" text="행삭제" anchor="default" onclick="group1_button4_onclick"/>
  22. <Button position="absolute 273 17 326 36" id="button5" class="btn2" text="행추가" anchor="default" onclick="group1_button5_onclick"/>
  23. <Static text="예문 현황" position="absolute 5 20 151 36" id="caption3" class="tit_2" anchor="default"/>
  24. <Grid position="absolute 4 41 381 510" id="grd_exmptmpl" binddataset="ds_main_exmptmpllist" anchor="default" onlbuttondown="group1_grd_exmptmpl_onlbuttondown" onlbuttonup="group1_grd_exmptmpl_onlbuttonup" cellsizingtype="both" autoenter="key">
  25. <Formats>
  26. <Format id="default">
  27. <Columns>
  28. <Column size="25" band="left"/>
  29. <Column size="98"/>
  30. <Column size="251"/>
  31. <Column size="50"/>
  32. <Column size="0"/>
  33. <Column size="0"/>
  34. <Column size="0"/>
  35. <Column size="0"/>
  36. </Columns>
  37. <Rows>
  38. <Row size="24" band="head"/>
  39. <Row size="24"/>
  40. </Rows>
  41. <Band id="head">
  42. <Cell/>
  43. <Cell col="1" text="코드"/>
  44. <Cell col="2" text="내용"/>
  45. <Cell col="3" text="순번"/>
  46. <Cell col="4" text="basecdflagdesc"/>
  47. <Cell col="5" text="basesuppdeptcd"/>
  48. <Cell col="6" text="basecdflag"/>
  49. <Cell col="7" text="seq"/>
  50. </Band>
  51. <Band id="body">
  52. <Cell celltype="head" displaytype="image"/>
  53. <Cell col="1" displaytype="text" edittype="text" style="align:left top;padding:5 2 0 2;" text="bind:basecd" wordwrap="char"/>
  54. <Cell col="2" displaytype="text" edittype="text" style="align:left top;padding:5 2 0 2;" text="bind:basecdcnts" wordwrap="char" editautoselect="true"/>
  55. <Cell col="3" displaytype="text" edittype="text" text="bind:sortno"/>
  56. <Cell col="4" text="bind:basecdflagdesc"/>
  57. <Cell col="5" text="bind:basesuppdeptcd"/>
  58. <Cell col="6" text="bind:basecdflag"/>
  59. <Cell col="7" text="bind:seq"/>
  60. </Band>
  61. </Format>
  62. </Formats>
  63. </Grid>
  64. <Shape position="absolute 4 36 381 42" linetype="horizontal" id="line2" class="line_1" anchor="default"/>
  65. <Button position="absolute 165 10 265 30" id="button6" visible="false" text="button6" anchor="default"/>
  66. <Grid position="absolute 388 270 993 510" id="grd_selectdiag" binddataset="ds_main_selectdiaglist" anchor="default" autofittype="col">
  67. <Formats>
  68. <Format id="default">
  69. <Columns>
  70. <Column size="151"/>
  71. <Column size="434"/>
  72. </Columns>
  73. <Rows>
  74. <Row size="24" band="head"/>
  75. <Row size="24"/>
  76. </Rows>
  77. <Band id="head">
  78. <Cell text="진단코드"/>
  79. <Cell col="1" text="진단명"/>
  80. </Band>
  81. <Band id="body">
  82. <Cell style="padding:0 2 0 2;" text="bind:termcd" wordwrap="char"/>
  83. <Cell col="1" style="padding:0 2 0 2;" text="bind:termengnm" wordwrap="char"/>
  84. </Band>
  85. </Format>
  86. </Formats>
  87. </Grid>
  88. <Static text="선택진단코드" position="absolute 390 249 524 265" id="caption4" class="tit_2" anchor="default"/>
  89. <Shape position="absolute 388 265 993 271" linetype="horizontal" id="line3" class="line_1" anchor="default"/>
  90. <Button position="absolute 940 246 993 265" id="button14" class="btn2" text="행삭제" anchor="default" onclick="group1_button14_onclick"/>
  91. <Edit position="absolute 470 17 993 36" id="input2" anchor="default" readonly="true"/>
  92. <Button position="absolute 7 45 23 61" id="button101" class="icon_search" text="" anchor="default" onclick="group1_button101_onclick"/>
  93. <Button position="absolute 207 17 271 36" id="button12" class="btn2" text="진단선택" anchor="default" onclick="group1_button12_onclick"/>
  94. <Button position="absolute 151 17 205 36" id="button17" class="btn7" visible="true" text="엑셀" anchor="default" onclick="group1_button17_onclick"/>
  95. <Shape id="line00" class="line_1" position="absolute 388 264 993 270"/>
  96. <Shape id="line01" class="line_1" position="absolute 388 266 993 272"/>
  97. <Shape id="line04" class="line_1" position="absolute 4 35 381 41"/>
  98. <Shape id="line05" class="line_1" position="absolute 4 37 381 43"/>
  99. </Layout>
  100. </Layouts>
  101. </Div>
  102. <Static text="예문내용" position="absolute 389 80 535 96" id="caption1" class="tit_2"/>
  103. <Shape position="absolute 388 96 993 102" linetype="horizontal" id="line1" class="line_1"/>
  104. <TextArea position="absolute 388 101 993 290" id="textarea1" wordwrap="char"/>
  105. <Button position="absolute 875 580 931 602" id="button2" class="btn4" text="저장" onclick="button2_onclick"/>
  106. <Button position="absolute 815 580 871 602" id="button3" class="btn4" text="선택" onclick="button3_onclick"/>
  107. <Button position="absolute 933 580 989 602" id="btn_cls" class="btn4" text="닫기" onclick="btn_cls_onclick"/>
  108. <Shape id="line00" class="line_1" position="absolute 388 95 993 101"/>
  109. <Shape id="line02" class="line_1" position="absolute 388 97 993 103"/>
  110. </Layout>
  111. </Layouts>
  112. <Objects>
  113. <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  114. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  115. <ColumnInfo>
  116. <Column id="comprod" type="STRING" size="256"/>
  117. </ColumnInfo>
  118. <Rows>
  119. <Row>
  120. <Col id="comprod">1000008513</Col>
  121. </Row>
  122. </Rows>
  123. </Dataset>
  124. <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  125. <ColumnInfo>
  126. <Column id="copyrslt" type="STRING" size="256"/>
  127. </ColumnInfo>
  128. <Rows>
  129. <Row>
  130. <Col id="copyrslt">* 진단예문 내용 보기 : 마우스 클릭 , * 진단예문 내용 선택 : 마우스 DOUBLE 클릭</Col>
  131. </Row>
  132. </Rows>
  133. </Dataset>
  134. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  135. <Dataset id="ds_init_A0434" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  136. <ColumnInfo>
  137. <Column id="cdnm" type="STRING"/>
  138. <Column id="cdid" type="STRING"/>
  139. </ColumnInfo>
  140. </Dataset>
  141. <Dataset id="ds_main_exmptmpllist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  142. <ColumnInfo>
  143. <Column id="basecd" type="STRING" size="256"/>
  144. <Column id="basecdcnts" type="STRING" size="256"/>
  145. <Column id="sortno" type="STRING" size="256"/>
  146. <Column id="basecdflagdesc" type="STRING" size="256"/>
  147. <Column id="basesuppdeptcd" type="STRING" size="256"/>
  148. <Column id="basecdflag" type="STRING" size="256"/>
  149. <Column id="seq" type="STRING" size="256"/>
  150. </ColumnInfo>
  151. <Rows>
  152. <Row>
  153. <Col id="basecd"/>
  154. <Col id="basecdcnts"/>
  155. <Col id="sortno"/>
  156. <Col id="basecdflagdesc"/>
  157. <Col id="basesuppdeptcd"/>
  158. <Col id="basecdflag">D</Col>
  159. <Col id="seq"/>
  160. </Row>
  161. </Rows>
  162. </Dataset>
  163. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  164. <ColumnInfo>
  165. <Column id="sendcontens" type="STRING" size="256"/>
  166. </ColumnInfo>
  167. <Rows>
  168. <Row/>
  169. </Rows>
  170. </Dataset>
  171. <Dataset id="ds_send_globalinstance" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  172. <ColumnInfo>
  173. <Column id="instance1" type="STRING" size="256"/>
  174. </ColumnInfo>
  175. <Rows>
  176. <Row/>
  177. </Rows>
  178. </Dataset>
  179. <Dataset id="ds_send_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  180. <ColumnInfo>
  181. <Column id="basecdflagdesc" type="STRING" size="256"/>
  182. <Column id="basecdflag" type="STRING" size="256"/>
  183. </ColumnInfo>
  184. <Rows>
  185. <Row>
  186. <Col id="basecdflagdesc"/>
  187. <Col id="basecdflag">D</Col>
  188. </Row>
  189. </Rows>
  190. </Dataset>
  191. <Dataset id="ds_main_selectdiaglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  192. <ColumnInfo>
  193. <Column id="termcd" type="STRING" size="256"/>
  194. <Column id="termengnm" type="STRING" size="256"/>
  195. </ColumnInfo>
  196. <Rows>
  197. <Row>
  198. <Col id="termcd"/>
  199. <Col id="termengnm"/>
  200. </Row>
  201. </Rows>
  202. </Dataset>
  203. </Objects>
  204. <Bind>
  205. <BindItem id="item0" compid="group1.input2" propid="value" datasetid="ds_init" columnid="copyrslt"/>
  206. <BindItem id="item1" compid="textarea1" propid="value" datasetid="ds_main" columnid="sendcontens"/>
  207. </Bind>
  208. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  209. * System Name :
  210. * Job Name :
  211. * Creator :
  212. * Make Date : 2015-11-10
  213. * Description :
  214. *---------------------------------------------------------------------------------------
  215. * Modify Date Modifier Modify Description
  216. *---------------------------------------------------------------------------------------
  217. * 2015-11-10 Live Converter TF->XP
  218. *
  219. *---------------------------------------------------------------------------------------
  220. ****************************************************************************************/
  221. //=======================================================================================
  222. // Lib Include
  223. //---------------------------------------------------------------------------------------
  224. include "com_commonxp::comm_main.xjs"
  225. include "ast_examcurexp::AEZ0001.xjs"
  226. include "ast_examcurexp::combolist.xjs"
  227. include "emr_commonxp::EMRCommon.xjs"
  228. include "emr_medirecxp::MMRCommon.xjs"
  229. include "emr_prcpmngtxp::MMO001.xjs"
  230. //=======================================================================================
  231. // Global Form Variable
  232. //---------------------------------------------------------------------------------------
  233. var arErrorCode = new HashArray();
  234. //=======================================================================================
  235. // Function
  236. //---------------------------------------------------------------------------------------
  237. /****************************************************************************************
  238. * Argument : N/A
  239. * Description : 결과예문관리 초기화 Function
  240. ****************************************************************************************/
  241. function fSetInit() {
  242. fGetComProd();
  243. }
  244. /****************************************************************************************
  245. * Argument : N/A
  246. * Description : 결과예문관리 초기화-내시경코드 Function
  247. ****************************************************************************************/
  248. function fGetComProd() {
  249. // zbcfGetCodeList( new Array("A0434"), new Array("/root/hidden/comprod") );
  250. var arrParam = [{dsNm: "ds_init_A0434", cdGrpId: "A0434"} ////root/hidden/comprod
  251. ]
  252. appf_getCodeList(arrParam);
  253. // submit("TRZBC00101", false);
  254. ds_init_A0434.deleteRow(0);
  255. var sProp_12_1 = "col=12,row=1,cellspacing=20,vcellspacing=0,itemWidth=-1,itemHeight=20,overflow='visible'";
  256. grp_sea.rdo_m_comprod.setInitComp(sProp_12_1,ds_init_A0434,"cdid","cdnm","fRdoComprodEvnt");
  257. grp_sea.rdo_m_comprod.setData(ds_hidden.getColumn(0,"comprod"));
  258. // rdo_comprod.attribute("cols")= 12;
  259. }
  260. function fRdoComprodEvnt() {
  261. ds_hidden.setColumn(0,"comprod",String(grp_sea.rdo_m_comprod.getData()).replace(","," "));
  262. fGetTmplList();
  263. }
  264. /****************************************************************************************
  265. * Argument : N/A
  266. * Description : 진단선택한 예문 Setting Function
  267. ****************************************************************************************/
  268. //function fAddDiag(iRow, iCol) {
  269. function fAddDiag(iRow) {
  270. var sTermcd = ds_main_exmptmpllist.getColumn(iRow,"basecd");
  271. var sTermengnm = ds_main_exmptmpllist.getColumn(iRow,"basecdcnts");
  272. var iFndRow = ds_main_selectdiaglist.findRow("termengnm",sTermengnm);
  273. if(iFndRow < 0 && !utlf_isNull(sTermengnm)){
  274. var iCurRow = ds_main_selectdiaglist.addRow();
  275. ds_main_selectdiaglist.setColumn(iCurRow,"termcd",sTermcd);
  276. ds_main_selectdiaglist.setColumn(iCurRow,"termengnm",sTermengnm);
  277. }
  278. }
  279. /****************************************************************************************
  280. * Argument : N/A
  281. * Description : 진단코드 선택 여부 체크
  282. ****************************************************************************************/
  283. function fVailCheck(){
  284. var rtn = true;
  285. for (var i = 0 ; i < ds_main_selectdiaglist.rowcount ; i++) {
  286. if (utlf_isNull(ds_main_selectdiaglist.getColumn(i,"termengnm")))
  287. {
  288. rtn = false;
  289. }
  290. }
  291. return rtn;
  292. }
  293. /****************************************************************************************
  294. * Argument : N/A
  295. * Description : 결과예문 선택 시 Parent Instance Setting Function
  296. ****************************************************************************************/
  297. function fSendContents() {
  298. if(!fVailCheck())
  299. {
  300. sysf_messageBox("진단은", "I003");
  301. return;
  302. }
  303. if(frmf_checkOpener()) //opener 검사
  304. {
  305. if(utlf_isNull(this.opener.objects["ds_temp_selectdiaglist"])) {
  306. opener.dsf_createDs("ds_temp_selectdiaglist");
  307. }
  308. opener.ds_temp_selectdiaglist.copyData(ds_main_selectdiaglist);
  309. }else {
  310. sysf_messageBox("Parent 창[결과관리]이 변경되었습니다.","I999");
  311. return;
  312. }
  313. this.close();
  314. }
  315. /****************************************************************************************
  316. * Argument : N/A
  317. * Description : 예문 조회를 위한 Function
  318. ****************************************************************************************/
  319. function fGetInitList() {
  320. ds_main_exmptmpllist.clearData();
  321. ds_main_selectdiaglist.clearData();
  322. ds_send_data.setColumn(0,"basecdflagdesc",ds_hidden.getColumn(0,"comprod"));
  323. call_TRAEB00302();
  324. if(arErrorCode.pop("TRAEB00302") > -1) {
  325. for(i = 1 ; i < group1.grd_exmptmpl.getCellCount("Head") ; i++){
  326. var sExpr ="color:&quot;#000000&quot;"
  327. +";color2:&quot;#000000&quot;"
  328. +";background:EXPR(sortno<19?&quot;#FFE4C4&quot;:&quot;#FFFFFF&quot;)"
  329. +";background2:EXPR(sortno<19?&quot;#FFE4C4&quot;:&quot;#FFFFFF&quot;)"
  330. ;
  331. group1.grd_exmptmpl.setCellProperty("body", i, "style", sExpr);
  332. }
  333. }
  334. }
  335. /****************************************************************************************
  336. * Argument : N/A
  337. * Description : 조회함수
  338. ****************************************************************************************/
  339. function call_TRAEB00302() {
  340. dsf_createDsRow("ds_send_reqdata",[{col:"basecdflagdesc", val:ds_send_data.getColumn(0,"basecdflagdesc")}
  341. ,{col:"basesuppdeptcd", val:ds_send_globalinstance.getColumn(0,"instance1")}
  342. ,{col:"udbasecdflag" , val:ds_send_data.getColumn(0,"basecdflag")}
  343. ,{col:"checkflag" , val:"1"}
  344. ]);
  345. var oParam = {};
  346. oParam.id = "TRAEB00302";
  347. oParam.service = "examcurebaseapp.ExmpTmpl";
  348. oParam.method = "reqGetExmpTmplList";
  349. oParam.inds = "req=ds_send_reqdata";
  350. oParam.outds = "ds_main_exmptmpllist=exmptmpl";
  351. oParam.async = false;
  352. oParam.callback = "cf_TRAEB00302";
  353. tranf_submit(oParam);
  354. }
  355. function cf_TRAEB00302(sSvcId, nErrorCode, sErrorMsg) {
  356. if(nErrorCode < 0) return;
  357. ds_main_exmptmpllist.updatecontrol = false;
  358. for(var i = 0 ; i < ds_main_exmptmpllist.rowcount ; i++) {
  359. ds_main_exmptmpllist.setColumn(i,"basecdcnts",utlf_transNullToEmpty(ds_main_exmptmpllist.getColumn(i,"basecdcnts")).getTrim());
  360. }
  361. ds_main_exmptmpllist.updatecontrol = true;
  362. ds_main_exmptmpllist.rowposition = -1;
  363. }
  364. /****************************************************************************************
  365. * Argument : N/A
  366. * Description : 조회실행
  367. ****************************************************************************************/
  368. function fGetTmplList() {
  369. ds_main_exmptmpllist.clearData();
  370. ds_send_data.setColumn(0,"basecdflagdesc",ds_hidden.getColumn(0,"comprod"));
  371. call_TRAEB00302();
  372. if(arErrorCode.pop("TRAEB00302") > -1) {
  373. for(i = 1 ; i < group1.grd_exmptmpl.getCellCount("Head") ; i++){
  374. var sExpr ="color:&quot;#000000&quot;"
  375. +";color2:&quot;#000000&quot;"
  376. +";background:EXPR(sortno<19?&quot;#FFE4C4&quot;:&quot;#FFFFFF&quot;)"
  377. +";background2:EXPR(sortno<19?&quot;#FFE4C4&quot;:&quot;#FFFFFF&quot;)"
  378. ;
  379. group1.grd_exmptmpl.setCellProperty("body", i, "style", sExpr);
  380. }
  381. }
  382. }
  383. /****************************************************************************************
  384. * Argument : N/A
  385. * Description : 예문 저장/수정/삭제를 위한 Function
  386. ****************************************************************************************/
  387. function fExeTmpl() {
  388. var row = ds_main_exmptmpllist.rowposition;
  389. if ( sysf_messageBox("","Q002")==6 ) {
  390. var dsUpdate = grdf_getGridUpdateData(group1.grd_exmptmpl, "all");
  391. grdf_setStatusColumn(dsUpdate, "m");
  392. if(dsUpdate.rowcount == 0){
  393. sysf_messageBox("업데이트 정보가 없습니다.", "I");
  394. return;
  395. } else {
  396. ds_send_savedata.clear();
  397. ds_send_savedata.copyData(dsUpdate, true);
  398. ds_send_savedata.updateColID("basecdflag","ubasecdflag");
  399. // submit("TXAEB00302");
  400. var oParam = {};
  401. oParam.id = "TXAEB00302";
  402. oParam.service = "examcurebaseapp.ExmpTmpl";
  403. oParam.method = "reqExeExmpTmplList";
  404. oParam.inds = "req=ds_send_savedata";
  405. oParam.outds = "ds_temp=item";
  406. oParam.async = true;
  407. //oParam.callback = "cf_TXAEB00302";
  408. tranf_submit(oParam);
  409. }
  410. }
  411. fGetTmplList();
  412. }
  413. /****************************************************************************************
  414. * Argument : diagInfo
  415. * Description :
  416. ****************************************************************************************/
  417. function fAddDiagSetValue(diagInfo) {
  418. var diagRow = diagInfo.split ( "▩" ).length;
  419. // var rowidx = ds_main_exmptmpllist.rowcount;
  420. for ( var i = 0; i < diagRow-1 ; i++ ) {
  421. var diagcd = lf_getArrayData( diagInfo, i, 9, "▩", "▦" );
  422. var diagengnm = lf_getArrayData( diagInfo, i, 2, "▩", "▦" );
  423. var nRow = ds_main_exmptmpllist.addRow();
  424. ds_main_exmptmpllist.setColumn(nRow,"basecd", diagcd);
  425. ds_main_exmptmpllist.setColumn(nRow,"basecdcnts", diagengnm);
  426. ds_main_exmptmpllist.setColumn(nRow,"basecdflag", ds_send_data.getColumn(0,"basecdflag"));
  427. ds_main_exmptmpllist.setColumn(nRow,"basesuppdeptcd", ds_send_globalinstance.getColumn(0,"instance1"));
  428. // var index = rdo_comprod.focusIndex+1;
  429. dsf_makeValue(ds_main_exmptmpllist,"basecdflagdesc","string",ds_hidden.getColumn(0,"comprod"),nRow);
  430. // rowidx++;
  431. }
  432. }
  433. //=======================================================================================
  434. // Event
  435. //---------------------------------------------------------------------------------------
  436. /****************************************************************************************
  437. * Components : Form
  438. * Components ID : SMAEB00301
  439. * Event : oninit
  440. * Argument : 01.obj : Object Event has occurred
  441. * : 02.e : Event Object
  442. * Description : 화면 처음 초기화시 폼초기화
  443. ****************************************************************************************/
  444. function SMAEB00302_oninit(obj:Form, e:InitEventInfo)
  445. {
  446. frmf_initForm(obj); // 폼 초기화
  447. }
  448. /****************************************************************************************
  449. * Components : Form
  450. * Components ID : SMAEB00301
  451. * Event : onload
  452. * Argument : 01.obj : Object Event has occurred
  453. * : 02.e : Event Object
  454. * Description : 화면 처음 초기화시 폼초기화
  455. ****************************************************************************************/
  456. function SMAEB00302_onload(obj:Form, e:LoadEventInfo)
  457. {
  458. lf_aezfSetSuppDeptcd(); //AEZ0001.xjs
  459. ds_send_globalinstance.setColumn(0,"instance1",frmf_getParameter("AST_DEPTCD"));
  460. fSetInit();
  461. fGetInitList();
  462. grdf_setRowTypeIcon(group1.grd_exmptmpl, 0);
  463. }
  464. /****************************************************************************************
  465. * Components : Button
  466. * Components ID : grp_sea.button1
  467. * Event : onclick
  468. * Argument : 01.obj : Object Event has occurred
  469. * : 02.e : Event Object
  470. * Description : 조회버튼
  471. ****************************************************************************************/
  472. function grp_sea_button1_onclick(obj:Button, e:ClickEventInfo)
  473. {
  474. fGetTmplList();
  475. }
  476. /****************************************************************************************
  477. * Components : Button
  478. * Components ID : group1.button17
  479. * Event : onclick
  480. * Argument : 01.obj : Object Event has occurred
  481. * : 02.e : Event Object
  482. * Description : 엑셀저장
  483. ****************************************************************************************/
  484. function group1_button17_onclick(obj:Button, e:ClickEventInfo)
  485. {
  486. grdf_exportExcel(group1.grd_exmptmpl,"excel","sheet1");
  487. }
  488. /****************************************************************************************
  489. * Components : Button
  490. * Components ID : group1.button12
  491. * Event : onclick
  492. * Argument : 01.obj : Object Event has occurred
  493. * : 02.e : Event Object
  494. * Description : 진단선택 팝업 오픈
  495. ****************************************************************************************/
  496. function group1_button12_onclick(obj:Button, e:ClickEventInfo)
  497. {
  498. frmf_setParameter("SPMMO03100_openflag", "ocs");
  499. var pid = "18668500";
  500. var orddd = "20071231";
  501. var param = pid+"▦"+orddd;
  502. frmf_setParameter("SPMMO03100_patinfo", param);
  503. frmf_modal("SPMMO03100", "SPMMO03100", null, null, null, 200, 40, null, null, null, null, null, "M");
  504. if ( frmf_getParameter( "SPMMO03100_rtn_useyn" ) == "Y" ) {
  505. fAddDiagSetValue(frmf_getParameter( "SPMMO03100_rtn" ));
  506. frmf_setParameter( "SPMMO03100_rtn_useyn", "" );
  507. }
  508. // model.recalculate();
  509. }
  510. /****************************************************************************************
  511. * Components : Button
  512. * Components ID : group1.button5
  513. * Event : onclick
  514. * Argument : 01.obj : Object Event has occurred
  515. * : 02.e : Event Object
  516. * Description : 행추가
  517. ****************************************************************************************/
  518. function group1_button5_onclick(obj:Button, e:ClickEventInfo)
  519. {
  520. var nRow = ds_main_exmptmpllist.addRow();
  521. // 행추가 시 bottomRow 사용하지 마세요!! 꼭
  522. // grd_exmptmpl.topRow = grd_exmptmpl.row;
  523. group1.grd_exmptmpl.setCellPos(nRow);
  524. ds_main_exmptmpllist.setColumn(nRow,"basesuppdeptcd",ds_send_globalinstance.getColumn(0,"instance1"));
  525. // var index = rdo_comprod.focusIndex+1;
  526. ds_main_exmptmpllist.setColumn(nRow,"basecdflagdesc",ds_hidden.getColumn(0,"comprod"));
  527. ds_main_exmptmpllist.setColumn(nRow,"basecdflag" ,ds_send_data.getColumn(0,"basecdflag"));
  528. }
  529. /****************************************************************************************
  530. * Components : Button
  531. * Components ID : group1.button4
  532. * Event : onclick
  533. * Argument : 01.obj : Object Event has occurred
  534. * : 02.e : Event Object
  535. * Description : 행삭제
  536. ****************************************************************************************/
  537. function group1_button4_onclick(obj:Button, e:ClickEventInfo)
  538. {
  539. var arrRow = new Array();
  540. arrRow[0] = ds_main_exmptmpllist.rowposition;
  541. grdf_setStatus(group1.grd_exmptmpl, "D", arrRow);
  542. }
  543. /****************************************************************************************
  544. * Components : Grid
  545. * Components ID : group1.grd_exmptmpl
  546. * Event : onlbuttonup
  547. * Argument : 01.obj : Object Event has occurred
  548. * : 02.e : Event Object
  549. * Description : 예문선택시
  550. ****************************************************************************************/
  551. function group1_grd_exmptmpl_onlbuttondown(obj:Grid, e:GridMouseEventInfo)
  552. {
  553. if(ds_main_exmptmpllist.rowposition != e.row) {
  554. textarea1.updateToDataset();
  555. ds_main_exmptmpllist.setColumn(ds_main_exmptmpllist.rowposition,"basecdcnts",utlf_transNullToEmpty(ds_main.getColumn(0,"sendcontens")));
  556. }
  557. }
  558. function group1_grd_exmptmpl_onlbuttonup(obj:Grid, e:GridMouseEventInfo)
  559. {
  560. var row = ds_main_exmptmpllist.rowposition;
  561. ds_main.setColumn(0,"sendcontens", ds_main_exmptmpllist.getColumn(row,"basecdcnts"));
  562. // var iRow = group1.grd_exmptmpl.row;
  563. // var iCol = group1.grd_exmptmpl.col;
  564. if(row > -1){
  565. // fAddDiag(iRow, iCol);
  566. fAddDiag(row);
  567. }
  568. }
  569. /****************************************************************************************
  570. * Components : Button
  571. * Components ID : group1.button14
  572. * Event : onclick
  573. * Argument : 01.obj : Object Event has occurred
  574. * : 02.e : Event Object
  575. * Description : 행삭제
  576. ****************************************************************************************/
  577. function group1_button14_onclick(obj:Button, e:ClickEventInfo)
  578. {
  579. var iRow = ds_main_selectdiaglist.rowposition;
  580. if(iRow > -1){
  581. ds_main_selectdiaglist.deleteRow(iRow);
  582. }
  583. // grd_selectdiag.refresh();
  584. }
  585. /****************************************************************************************
  586. * Components : Button
  587. * Components ID : group2.button3
  588. * Event : onclick
  589. * Argument : 01.obj : Object Event has occurred
  590. * : 02.e : Event Object
  591. * Description : 선택
  592. ****************************************************************************************/
  593. function button3_onclick(obj:Button, e:ClickEventInfo)
  594. {
  595. if ( ds_main_exmptmpllist.rowposition < 0 ) return;
  596. fSendContents();
  597. }
  598. /****************************************************************************************
  599. * Components : Button
  600. * Components ID : group2.button2
  601. * Event : onclick
  602. * Argument : 01.obj : Object Event has occurred
  603. * : 02.e : Event Object
  604. * Description : 저장
  605. ****************************************************************************************/
  606. function button2_onclick(obj:Button, e:ClickEventInfo)
  607. {
  608. fExeTmpl();
  609. }
  610. /****************************************************************************************
  611. * Components : Button
  612. * Components ID : group2.btn_cls
  613. * Event : onclick
  614. * Argument : 01.obj : Object Event has occurred
  615. * : 02.e : Event Object
  616. * Description : 닫기
  617. ****************************************************************************************/
  618. function btn_cls_onclick(obj:Button, e:ClickEventInfo)
  619. {
  620. this.close();
  621. }
  622. function group1_button101_onclick(obj:Button, e:ClickEventInfo)
  623. {
  624. frmf_setParameter("SPMMO03100_openflag", "ocs");
  625. var pid = "18668500";
  626. var orddd = "20071231";
  627. var param = pid+"▦"+orddd;
  628. frmf_setParameter("SPMMO03100_patinfo", param);
  629. frmf_modal("SPMMO03100", "SPMMO03100", null, null, null, 200, 40, null, null, null, null, null, "M");
  630. if ( frmf_getParameter( "SPMMO03100_rtn_useyn" ) == "Y" ) {
  631. fAddDiagSetValue(frmf_getParameter( "SPMMO03100_rtn" ));
  632. frmf_setParameter( "SPMMO03100_rtn_useyn", "" );
  633. }
  634. // model.recalculate();
  635. }
  636. ]]></Script>
  637. </Form>
  638. </FDL>