SMADT50201_약품재고관리 환자별 상세내역.xfdl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMADT50201" position="absolute 0 0 837 736" titletext="약품 재고 관리" oninit="SMADT50201_oninit" onload="SMADT50201_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 25 836 735" id="group3" scrollbars="autoboth" anchor="all">
  8. <Layouts>
  9. <Layout>
  10. <Static text="상세 내역" position="absolute 0 54 183 71" id="caption10" class="tit_2" anchor="default"/>
  11. <Grid position="absolute 0 75 836 710" id="datagrid1" binddataset="ds_main_prcplist" anchor="all" cellsizingtype="both" onvtracklast="group3_datagrid1_onvtracklast" selecttype="multirow" extendsizetype="row">
  12. <Formats>
  13. <Format id="default">
  14. <Columns>
  15. <Column size="25" band="left"/>
  16. <Column size="60"/>
  17. <Column size="60"/>
  18. <Column size="60"/>
  19. <Column size="60"/>
  20. <Column size="60"/>
  21. <Column size="45"/>
  22. <Column size="69"/>
  23. <Column size="80"/>
  24. <Column size="0"/>
  25. <Column size="180"/>
  26. <Column size="60"/>
  27. <Column size="0"/>
  28. <Column size="57"/>
  29. </Columns>
  30. <Rows>
  31. <Row size="24" band="head"/>
  32. <Row size="24"/>
  33. </Rows>
  34. <Band id="head">
  35. <Cell/>
  36. <Cell col="1" text="마감일자"/>
  37. <Cell col="2" text="마감시간"/>
  38. <Cell col="3" text="적용일자"/>
  39. <Cell col="4" text="약품구분"/>
  40. <Cell col="5" text="발행부서"/>
  41. <Cell col="6" text="병동"/>
  42. <Cell col="7" text="등록번호"/>
  43. <Cell col="8" text="환자명"/>
  44. <Cell col="9" text="약품코드"/>
  45. <Cell col="10" text="약품명"/>
  46. <Cell col="11" text="불출수량"/>
  47. <Cell col="12" text="UNIQNO"/>
  48. <Cell col="13" text="투약번호"/>
  49. </Band>
  50. <Band id="body">
  51. <Cell celltype="head" text="expr:currow + 1"/>
  52. <Cell col="1" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:genrdd"/>
  53. <Cell col="2" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:genrtm"/>
  54. <Cell col="3" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:prcpdd"/>
  55. <Cell col="4" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:spcldrug" wordwrap="char"/>
  56. <Cell col="5" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:deptnm" wordwrap="char"/>
  57. <Cell col="6" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:wardnm"/>
  58. <Cell col="7" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:pid"/>
  59. <Cell col="8" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:panm" wordwrap="char"/>
  60. <Cell col="9" displaytype="text" text="bind:calcscorcd"/>
  61. <Cell col="10" displaytype="text" style="align:left top;padding:4 2 1 2;" text="bind:engnm" wordwrap="char"/>
  62. <Cell col="11" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:execprcptotqty"/>
  63. <Cell col="12" displaytype="text" text="bind:execdd"/>
  64. <Cell col="13" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:drugno"/>
  65. </Band>
  66. </Format>
  67. </Formats>
  68. </Grid>
  69. <Shape position="absolute 0 70 836 77" linetype="horizontal" id="line4" class="line_1" anchor="left top right" style="strokepen:3 solid #33bbbbff;"/>
  70. <Div id="group2" taborder="1" position="absolute 0 0 836 45" class="div_SA" anchor="left top right">
  71. <Layouts>
  72. <Layout>
  73. <Static id="caption1" text="조회/마감/재고반영 부서" class="search_name" visible="false" position="absolute 185 15 370 32" anchor="default"/>
  74. <Button id="btn_srch" taborder="1" text="조회" class="btn3" visible="false" position="absolute 724 10 784 32" anchor="default" onclick="group3_group2_btn_srch_onclick"/>
  75. <Button id="btn_excsave" taborder="2" text="엑셀저장" class="btn2" visible="false" position="absolute 15 15 79 34" anchor="default" onclick="group3_group2_btn_excsave_onclick"/>
  76. </Layout>
  77. </Layouts>
  78. </Div>
  79. </Layout>
  80. </Layouts>
  81. </Div>
  82. <Static id="caption6" text="약품 재고 환자별 상세 내역" class="tit_1" position="absolute 0 0 217 25"/>
  83. </Layout>
  84. </Layouts>
  85. <Objects>
  86. <Dataset id="ds_main_prcplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  87. <ColumnInfo>
  88. <Column id="genrdd" type="STRING"/>
  89. <Column id="genrtm" type="STRING"/>
  90. <Column id="prcpdd" type="STRING"/>
  91. <Column id="spcldrug" type="STRING"/>
  92. <Column id="deptnm" type="STRING"/>
  93. <Column id="wardnm" type="STRING"/>
  94. <Column id="pid" type="STRING"/>
  95. <Column id="panm" type="STRING"/>
  96. <Column id="calcscorcd" type="STRING"/>
  97. <Column id="engnm" type="STRING"/>
  98. <Column id="execprcptotqty" type="STRING"/>
  99. <Column id="execdd" type="STRING"/>
  100. <Column id="drugno" type="STRING"/>
  101. </ColumnInfo>
  102. </Dataset>
  103. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  104. <ColumnInfo>
  105. <Column id="srchfromdd" type="STRING" size="256"/>
  106. <Column id="calcscorcd" type="STRING" size="256"/>
  107. <Column id="execdeptcd" type="STRING" size="256"/>
  108. <Column id="prcpflag" type="STRING" size="256"/>
  109. <Column id="endtime" type="STRING" size="256"/>
  110. <Column id="fromddflag" type="STRING" size="256"/>
  111. <Column id="fromtm" type="STRING" size="256"/>
  112. <Column id="toddflag" type="STRING" size="256"/>
  113. <Column id="totm" type="STRING" size="256"/>
  114. <Column id="fromdd" type="STRING" size="256"/>
  115. <Column id="todd" type="STRING" size="256"/>
  116. <Column id="srchorddeptcd" type="STRING" size="256"/>
  117. <Column id="issdeptcd" type="STRING" size="256"/>
  118. <Column id="spcldrug" type="STRING" size="256"/>
  119. <Column id="maendflag" type="STRING" size="256"/>
  120. <Column id="ddflag" type="STRING" size="256"/>
  121. <Column id="srchdeptcd" type="STRING" size="256"/>
  122. <Column id="offset" type="STRING" size="256"/>
  123. <Column id="pagesize" type="STRING" size="256"/>
  124. </ColumnInfo>
  125. <Rows>
  126. <Row>
  127. <Col id="srchfromdd"/>
  128. <Col id="calcscorcd"/>
  129. <Col id="execdeptcd"/>
  130. <Col id="prcpflag">O</Col>
  131. <Col id="endtime"/>
  132. <Col id="fromddflag"/>
  133. <Col id="fromtm">150001</Col>
  134. <Col id="toddflag"/>
  135. <Col id="totm">150000</Col>
  136. <Col id="fromdd"/>
  137. <Col id="todd"/>
  138. <Col id="srchorddeptcd"/>
  139. <Col id="issdeptcd"/>
  140. <Col id="spcldrug"/>
  141. <Col id="maendflag"/>
  142. <Col id="ddflag"/>
  143. <Col id="srchdeptcd">전체</Col>
  144. <Col id="offset">0</Col>
  145. <Col id="pagesize">1000</Col>
  146. </Row>
  147. </Rows>
  148. </Dataset>
  149. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  150. <ColumnInfo>
  151. <Column id="drugcd" type="STRING" size="256"/>
  152. <Column id="fromddflag" type="STRING" size="256"/>
  153. <Column id="toddflag" type="STRING" size="256"/>
  154. <Column id="fromtm" type="STRING" size="256"/>
  155. <Column id="totm" type="STRING" size="256"/>
  156. <Column id="issdeptcd" type="STRING" size="256"/>
  157. </ColumnInfo>
  158. <Rows>
  159. <Row>
  160. <Col id="drugcd"/>
  161. <Col id="fromddflag"/>
  162. <Col id="toddflag"/>
  163. <Col id="fromtm"/>
  164. <Col id="totm"/>
  165. <Col id="issdeptcd"/>
  166. </Row>
  167. </Rows>
  168. </Dataset>
  169. <Dataset id="ds_init_chksum" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  170. </Objects>
  171. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  172. * System Name :
  173. * Job Name :
  174. * Creator :
  175. * Make Date : 2015-11-13
  176. * Description :
  177. *---------------------------------------------------------------------------------------
  178. * Modify Date Modifier Modify Description
  179. *---------------------------------------------------------------------------------------
  180. * 2015-11-13 Live Converter TF->XP
  181. *
  182. *---------------------------------------------------------------------------------------
  183. ****************************************************************************************/
  184. include "com_commonxp::comm_main.xjs";
  185. var arErrorCode = new HashArray();
  186. /******************************************************************
  187. * Argument :
  188. * Description : 초기화
  189. ******************************************************************/
  190. function SMADT50201_oninit(obj:Form, e:InitEventInfo)
  191. {
  192. frmf_initForm(obj);
  193. }
  194. function SMADT50201_onload(obj:Form, e:LoadEventInfo)
  195. {
  196. // 약품재고관리 상세 (메인메뉴에서 본 화면 호출 시 예외처리)
  197. try {
  198. if( arg_ds_temp.rowcount > 0 ){
  199. ds_temp.copyData(arg_ds_temp);
  200. }
  201. } catch(e) {
  202. sysf_catchTrace(e);
  203. }
  204. grdf_setGridSort(group3.datagrid1); // 그리드 소트만
  205. ds_main_prcplist.clearData();
  206. frmf_inputEnterKey("group3.group2.btn_srch", "onclick", new ClickEventInfo);
  207. }
  208. /******************************************************************
  209. * Argument :
  210. * Description : 조회 Button event
  211. ******************************************************************/
  212. function group3_group2_btn_srch_onclick(obj:Button, e:ClickEventInfo)
  213. {
  214. ds_send.setColumn(0, "calcscorcd", ds_temp.getColumn(0, "drugcd"));
  215. ds_send.setColumn(0, "fromddflag", ds_temp.getColumn(0, "fromddflag"));
  216. ds_send.setColumn(0, "toddflag", ds_temp.getColumn(0, "toddflag"));
  217. ds_send.setColumn(0, "fromtm", ds_temp.getColumn(0, "fromtm"));
  218. ds_send.setColumn(0, "totm", ds_temp.getColumn(0, "totm"));
  219. var issdeptcd = ds_temp.getColumn(0, "issdeptcd");
  220. if(issdeptcd == "병동약국") {
  221. ds_send.setColumn(0, "issdeptcd","3240300000");
  222. } else if(issdeptcd == "외래약국") {
  223. ds_send.setColumn(0, "issdeptcd","3240400000");
  224. } else if(issdeptcd == "특수조제실") {
  225. ds_send.setColumn(0, "issdeptcd","3240807000");
  226. }
  227. dsf_setTypeFormat(ds_send, "offset:INT^pagesize:INT");
  228. var oParam = {};
  229. oParam.id = "TRADT50203";
  230. oParam.service = "pharmacystocapp.DrugStocSum";
  231. oParam.method = "reqGetDrugStocSumDetlList";
  232. oParam.inds = "req=ds_send";
  233. oParam.outds = "ds_main_prcplist=prcpinfo";
  234. oParam.async = false;
  235. //oParam.callback = "cf_TRADT50203";
  236. tranf_submit(oParam);
  237. }
  238. /******************************************************************
  239. * Argument :
  240. * Description : Button event
  241. ******************************************************************/
  242. function group3_group2_btn_excsave_onclick(obj:Button, e:ClickEventInfo)
  243. {
  244. // 조회일자로 ast에 집계 출력된 내역이 있는지 확인.
  245. var oParam = {};
  246. oParam.id = "TRADT11026";
  247. oParam.service = "pharmacydrugsumapp.BeforeCure";
  248. oParam.method = "reqGetChkAst";
  249. oParam.inds = "req=ds_send";
  250. oParam.outds = "ds_init_chksum=item";
  251. oParam.async = false;
  252. //oParam.callback = "cf_TRADT11026";
  253. tranf_submit(oParam);
  254. var chkast = ds_init_chksum.getColumn(0, "chkast");
  255. // ast에 집계된 내역이 없으면 중지
  256. if( chkast != "Y" ) {
  257. alert("조회된 일자로 발주된 데이터가 없습니다. ");
  258. return;
  259. }
  260. // 조회일자로 집계된 내역을 출력한다.
  261. var prcplist = ds_main_prcplist.getColCount(0, "inorddeptnm");
  262. ds_send.setColumn(0, "prnflag", "E");
  263. if( utlf_isNull(prcplist) ) {
  264. ds_main_prcplist.clearData();
  265. var oParam = {};
  266. oParam.id = "TRADT11024";
  267. oParam.service = "pharmacydrugsumapp.BeforeCure";
  268. oParam.method = "reqGetAstSum";
  269. oParam.inds = "req=ds_send";
  270. oParam.outds = "ds_main_prcplist=astinfo";
  271. oParam.async = false;
  272. oParam.callback = "cf_TRADT11024";
  273. tranf_submit(oParam);
  274. }
  275. //var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  276. if( ds_main_prcplist.getRowCount > 0 ){
  277. grdf_exportExcel(datagrid1, "약품재고환자별상세내역", "약품재고환자별상세내역", false, "", "user", false);
  278. } else {
  279. sysf_messageBox("조회된 데이터가 ", "I004");
  280. }
  281. //model.removeNodeset("/root/send/prcplist/prcpinfo")
  282. }
  283. function group3_datagrid1_onvtracklast(obj:Grid, e:ScrollEventInfo)
  284. {
  285. ds_send.setColumn(0, "offset", ds_main_prcplist.rowcount);
  286. dsf_setTypeFormat(ds_send, "offset:INT^pagesize:INT");
  287. dsf_createDs("ds_temp_prcplist");
  288. ds_temp_prcplist.assign(ds_main_prcplist);
  289. ds_temp_prcplist.clearData();
  290. var oParam = {};
  291. oParam.id = "TRADT50203";
  292. oParam.service = "pharmacystocapp.DrugStocSum";
  293. oParam.method = "reqGetDrugStocSumDetlList";
  294. oParam.inds = "req=ds_send";
  295. oParam.outds = "ds_temp_prcplist=prcpinfo";
  296. oParam.async = false;
  297. oParam.callback = "cf_TRADT50203";
  298. tranf_submit(oParam);
  299. }
  300. function cf_TRADT50203(sSvcId, nErrorCode, sErrorMsg) {
  301. if(nErrorCode < 0) return;
  302. if( ds_temp_prcplist.rowcount > 0 ){
  303. ds_main_prcplist.appendData(ds_temp_prcplist, true, false);
  304. }
  305. dsf_deleteDs("ds_temp_prcplist");
  306. }]]></Script>
  307. </Form>
  308. </FDL>