SMLBP02300_1pint 수혈율.xfdl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMLBP02300" position="absolute 0 0 1256 805" titletext="1pint 수혈율" onload="SMLBP02300_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="group3" position="absolute 0 25 1256 67" anchor="left top right" positiontype="position" class="div_SA">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption3" class="search_name" position="absolute 8 10 82 30" anchor="default" text="조회기간" positiontype="position"/>
  11. <Button id="button1" class="btn1" position="absolute 1188 10 1244 30" anchor="top right" text="조회" onlbuttonup="button1_onlbuttonup" positiontype="position"/>
  12. <Calendar id="ipt_fromdd" taborder="1" dateformat="yyyy-MM-dd" class="input_search" position="absolute 99 10 189 30" onchanged="group3_ipt_fromdd_onchanged"/>
  13. <Static id="caption8" text="~" position="absolute 189 10 205 30" style="align:center middle;"/>
  14. <Calendar id="ipt_todd" taborder="2" dateformat="yyyy-MM-dd" class="input_search" position="absolute 205 10 295 30" onchanged="group3_ipt_todd_onchanged"/>
  15. </Layout>
  16. </Layouts>
  17. </Div>
  18. <Div id="group4" position="absolute 1156 5 1256 25" anchor="top right" positiontype="position">
  19. <Layouts>
  20. <Layout/>
  21. </Layouts>
  22. </Div>
  23. <Grid id="grd_onedetail" taborder="2" useinputpanel="false" position="absolute 495 97 1256 805" autofittype="col" anchor="all" binddataset="ds_grid_grd_onedetail">
  24. <Formats>
  25. <Format id="default">
  26. <Columns>
  27. <Column size="30"/>
  28. <Column size="100"/>
  29. <Column size="100"/>
  30. <Column size="100"/>
  31. <Column size="100"/>
  32. <Column size="120"/>
  33. <Column size="50"/>
  34. <Column size="120"/>
  35. </Columns>
  36. <Rows>
  37. <Row size="22" band="head"/>
  38. <Row size="20"/>
  39. </Rows>
  40. <Band id="head">
  41. <Cell text="No."/>
  42. <Cell col="1" text="등록번호"/>
  43. <Cell col="2" text="환자명"/>
  44. <Cell col="3" text="입원일"/>
  45. <Cell col="4" text="퇴원일"/>
  46. <Cell col="5" text="성분제제"/>
  47. <Cell col="6" text="상태"/>
  48. <Cell col="7" text="실시일시"/>
  49. </Band>
  50. <Band id="body">
  51. <Cell expr="expr:currow+1"/>
  52. <Cell col="1" style="align:center middle;" text="bind:pid"/>
  53. <Cell col="2" style="align:center middle;" text="bind:hngnm"/>
  54. <Cell col="3" style="align:center middle;" text="bind:indd" mask="expr:indd==null?'':'####-##-##'"/>
  55. <Cell col="4" style="align:center middle;" text="bind:dschdd" mask="expr:dschdd==null?'':'####-##-##'"/>
  56. <Cell col="5" style="align:center middle;" text="bind:blodcomnm"/>
  57. <Cell col="6" style="align:center middle;" text="bind:blodcomstat"/>
  58. <Cell col="7" style="align:center middle;" text="bind:execdt" mask="expr:execdt==null?'':'####-##-## ##:##'"/>
  59. </Band>
  60. </Format>
  61. </Formats>
  62. </Grid>
  63. <Grid id="datagrid1" taborder="4" useinputpanel="false" position="absolute 0 97 485 805" onclick="datagrid1_onclick" autofittype="col" anchor="left top bottom">
  64. <Formats>
  65. <Format id="default">
  66. <Columns>
  67. <Column size="100"/>
  68. <Column size="100"/>
  69. <Column size="100"/>
  70. <Column size="100"/>
  71. <Column size="0"/>
  72. </Columns>
  73. <Rows>
  74. <Row size="22" band="head"/>
  75. <Row size="20"/>
  76. </Rows>
  77. <Band id="head">
  78. <Cell text="처방부서"/>
  79. <Cell col="1" text="1Pint 건수"/>
  80. <Cell col="2" text="전체건수"/>
  81. <Cell col="3" text="1pint 수혈율"/>
  82. <Cell col="4" text="1pint 상세"/>
  83. </Band>
  84. <Band id="body">
  85. <Cell style="align:center middle;"/>
  86. <Cell col="1" style="align:right middle;"/>
  87. <Cell col="2" style="align:right middle;"/>
  88. <Cell col="3" style="align:right middle;" mask="#,##0.00"/>
  89. <Cell col="4"/>
  90. </Band>
  91. </Format>
  92. </Formats>
  93. </Grid>
  94. <Static id="caption1" text="1pint 수혈율" class="tit_2" position="absolute 0 77 131 97"/>
  95. <Static id="caption2" text="1pint 수혈 세부 내역" class="tit_2" position="absolute 495 77 652 97"/>
  96. <Button id="btn_excel" taborder="1" text="엑셀저장" class="btn7" position="absolute 1180 74 1255 94" anchor="top right" onclick="btn_excel_onclick"/>
  97. <Button id="btn_reset" taborder="5" text="초기화" onlbuttonup="btn_reset_onlbuttonup" class="btn4" position="absolute 1187 0 1256 20" anchor="top right"/>
  98. <Button id="button00" taborder="6" text="엑셀저장" class="btn7" position="absolute 408 74 484 94" onclick="button00_onclick"/>
  99. <Grid id="grd_getOnePint" taborder="7" useinputpanel="false" autofittype="col" position="absolute 0 97 485 805" anchor="left top bottom" onclick="datagrid1_onclick" binddataset="ds_grid_grd_getOnePint" oncellclick="grd_getOnePint_oncellclick">
  100. <Formats>
  101. <Format id="default">
  102. <Columns>
  103. <Column size="30"/>
  104. <Column size="100"/>
  105. <Column size="100"/>
  106. <Column size="100"/>
  107. <Column size="100"/>
  108. <Column size="0"/>
  109. </Columns>
  110. <Rows>
  111. <Row size="22" band="head"/>
  112. <Row size="20"/>
  113. </Rows>
  114. <Band id="head">
  115. <Cell text="No."/>
  116. <Cell col="1" text="처방부서"/>
  117. <Cell col="2" text="1Pint 건수"/>
  118. <Cell col="3" text="전체건수"/>
  119. <Cell col="4" text="1pint 수혈율"/>
  120. <Cell col="5" text="1pint 상세"/>
  121. </Band>
  122. <Band id="body">
  123. <Cell expr="expr:currow+1"/>
  124. <Cell col="1" style="align:center middle;" text="bind:dept"/>
  125. <Cell col="2" style="align:right middle;" text="bind:one"/>
  126. <Cell col="3" style="align:right middle;" text="bind:all"/>
  127. <Cell col="4" displaytype="number" style="align:right middle;" text="bind:per" mask="#,##0.0#"/>
  128. <Cell col="5"/>
  129. </Band>
  130. </Format>
  131. </Formats>
  132. </Grid>
  133. <Static id="caption6" text="1회 입원 기간중 1pint 수혈율" class="tit_1" position="absolute 0 0 207 25"/>
  134. </Layout>
  135. </Layouts>
  136. <Objects>
  137. <Dataset id="ds_grid_grd_getOnePint" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  138. <ColumnInfo>
  139. <column id="dept" type="STRING" size="256"/>
  140. <column id="one" type="STRING" size="256"/>
  141. <column id="all" type="STRING" size="256"/>
  142. <column id="per" type="STRING" size="256"/>
  143. <Column id="onedetail" type="STRING" size="256"/>
  144. </ColumnInfo>
  145. </Dataset>
  146. <Dataset id="ds_grid_grd_onedetail" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  147. <ColumnInfo>
  148. <column id="pid" type="STRING" size="256"/>
  149. <column id="hngnm" type="STRING" size="256"/>
  150. <column id="indd" type="STRING" size="256"/>
  151. <column id="dschdd" type="STRING" size="256"/>
  152. <Column id="blodcomnm" type="STRING" size="256"/>
  153. <Column id="blodcomstat" type="STRING" size="256"/>
  154. <Column id="execdt" type="STRING" size="256"/>
  155. </ColumnInfo>
  156. </Dataset>
  157. </Objects>
  158. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  159. * System Name :
  160. * Job Name :
  161. * Creator :
  162. * Make Date : 2015-05-01
  163. * Description :
  164. *---------------------------------------------------------------------------------------
  165. * Modify Date Modifier Modify Description
  166. *---------------------------------------------------------------------------------------
  167. * 2015-05-01 Live Converter TF->XP
  168. *
  169. *---------------------------------------------------------------------------------------
  170. ****************************************************************************************/
  171. include "com_commonxp::comm_main.xjs";
  172. include "lis_commonxp::LZZ001.xjs";
  173. include "lis_commonxp::LLZ001.xjs";
  174. function SMLBP02300_onload(obj:Form, e:LoadEventInfo)
  175. {
  176. //폼 초기화 함수
  177. frmf_initForm(obj);
  178. lf_setInit();
  179. }
  180. function lf_setInit() {
  181. ds_grid_grd_getOnePint.clearData();
  182. ds_grid_grd_onedetail.clearData();
  183. var toDay = utlf_getCurrentDate();
  184. toDay = utlf_addMonth(toDay, -1);
  185. group3.ipt_fromdd.value = toDay;
  186. group3.ipt_todd.value = utlf_getCurrentDate();
  187. }
  188. function lf_getOnePint() {
  189. var fromdd = group3.ipt_fromdd.value;
  190. var todd = group3.ipt_todd.value;
  191. var sInDsName = dsf_createDsRow("ds_temp_search"
  192. , [{col: "fromdd", val:fromdd }
  193. , {col: "todd", val:todd }
  194. ]);
  195. var oParam = {};
  196. oParam.id = "TRLBP02201";
  197. oParam.service = "refprintmngtapp.BloodBankRefPrintMngt";
  198. oParam.method = "reqGetOnePint";
  199. oParam.inds = "cond="+sInDsName;
  200. oParam.outds = "ds_grid_grd_getOnePint=getOnePint";
  201. oParam.async = false;
  202. oParam.callback = "cbf_SMLBP02300";
  203. tranf_submit(oParam);
  204. }
  205. // 엑셀 저장
  206. function lf_setOuterExcel(grdId,titleNm) {
  207. trace(grdId);
  208. grdf_exportExcel(grdId, lf_lisGetTitle(this) + "_" + titleNm, "sheet1", false);
  209. }
  210. // callback 함수
  211. function cbf_SMLBP02300(strSvcID, nErrorCode, strErrorMag) {
  212. if(nErrorCode != 0) {
  213. sysf_messageBox("ID: "+ strSvcID + " Error: " + strErrorMag, "E009", "");
  214. }else{
  215. switch(strSvcID){
  216. case "TRLBP02301":
  217. break;
  218. default:
  219. break;
  220. }
  221. }
  222. }
  223. function grd_getOnePint_oncellclick(obj:Grid, e:GridClickEventInfo)
  224. {
  225. ds_grid_grd_onedetail.clearData();
  226. var addRw = 0;
  227. var cLob = "<XML>"+ds_grid_grd_getOnePint.getColumn(e.row, "onedetail")+"</XML>";
  228. trace(cLob);
  229. if(!utlf_isNull(cLob)) {
  230. var DomParser00 = new DomParser;
  231. var DomDoc00 = DomParser00.parseFromString(cLob);
  232. var findElement = DomDoc00.getElementsByTagName("element");
  233. for(var i=0; i<findElement.length; i++) {
  234. addRw = ds_grid_grd_onedetail.addRow();
  235. ds_grid_grd_onedetail.setColumn(addRw, "pid", DomDoc00.getElementsByTagName("PID")[i].sourceContent);
  236. ds_grid_grd_onedetail.setColumn(addRw, "hngnm", DomDoc00.getElementsByTagName("HNGNM")[i].sourceContent);
  237. ds_grid_grd_onedetail.setColumn(addRw, "indd", DomDoc00.getElementsByTagName("INDD")[i].sourceContent);
  238. ds_grid_grd_onedetail.setColumn(addRw, "dschdd", DomDoc00.getElementsByTagName("DSCHDD")[i].sourceContent);
  239. ds_grid_grd_onedetail.setColumn(addRw, "blodcomnm", DomDoc00.getElementsByTagName("BLODCOMNM")[i].sourceContent);
  240. ds_grid_grd_onedetail.setColumn(addRw, "blodcomstat", DomDoc00.getElementsByTagName("BLODCOMSTAT")[i].sourceContent);
  241. ds_grid_grd_onedetail.setColumn(addRw, "execdt", DomDoc00.getElementsByTagName("EXECDT")[i].sourceContent);
  242. }
  243. }
  244. }
  245. function button1_onlbuttonup(obj:Button, e:MouseEventInfo)
  246. {
  247. lf_getOnePint();
  248. }
  249. function button00_onclick(obj:Button, e:ClickEventInfo)
  250. {
  251. if(ds_grid_grd_getOnePint.rowcount>0){
  252. lf_setOuterExcel(grd_getOnePint,"1pint 수혈율");
  253. }
  254. }
  255. function btn_reset_onlbuttonup(obj:Button, e:MouseEventInfo)
  256. {
  257. lf_setInit();
  258. }
  259. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  260. {
  261. if(grd_onedetail.rowcount>0){
  262. lf_setOuterExcel(grd_onedetail,"1pint 수혈 세부 내역");
  263. }
  264. }
  265. function group3_ipt_fromdd_onchanged(obj:Calendar, e:ChangeEventInfo)
  266. {
  267. gf_checkFromToDate("FROM",group3.ipt_fromdd,group3.ipt_todd);
  268. }
  269. function group3_ipt_todd_onchanged(obj:Calendar, e:ChangeEventInfo)
  270. {
  271. gf_checkFromToDate("TO",group3.ipt_fromdd,group3.ipt_todd);
  272. }
  273. function button2_onclick(obj:Button, e:ClickEventInfo)
  274. {
  275. }
  276. ]]></Script>
  277. </Form>
  278. </FDL>