SMADT30900_마약재고입력및출력.xfdl 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMADT30900" position="absolute 0 0 1200 794" titletext="마약/향정약 처방관리" oninit="SMADT30900_oninit" onload="SMADT30900_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 13 1195 757" id="group3" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Div position="absolute 0 12 1195 52" id="group2" class="div_SA" anchor="default">
  11. <Layouts>
  12. <Layout>
  13. <Static text="조회년월 :" position="absolute 10 13 99 30" id="caption9" class="search_name" anchor="default"/>
  14. <cp_monthCal id="ipt_fstdd" titletext="monthCalendar" taborder="2" text="cp_monthCal00" scrollbars="none" position="absolute 98 10 198 31"/>
  15. <Button id="button1" taborder="3" text="일계표 재고반영" onclick="group3_button1_onclick" class="btn4" position="absolute 924 10 1051 32"/>
  16. <Button id="btn_prcp" taborder="4" text="상비품/비고 저장" onclick="group3_btn_prcp_onclick" class="btn4" position="absolute 1060 10 1188 32"/>
  17. </Layout>
  18. </Layouts>
  19. </Div>
  20. <Tab position="absolute 0 80 1195 744" id="switch1" class="sw_no_border" anchor="default">
  21. <Tabpages/>
  22. </Tab>
  23. </Layout>
  24. </Layouts>
  25. </Div>
  26. <Button position="absolute 1122 768 1195 790" id="btn_excel" class="btn7" text="엑셀저장" onclick="btn_excel_onclick"/>
  27. <Button position="absolute 987 768 1115 790" id="button8" class="btn6" text="월사용현황보고서" onclick="button8_onclick"/>
  28. <Grid position="absolute 0 98 1195 763" id="grd_narclist" class="datagrid2" binddataset="ds_grd_narclist" autoenter="select" cellsizingtype="both" extendsizetype="row">
  29. <Formats>
  30. <Format id="default">
  31. <Columns>
  32. <Column size="25" band="left"/>
  33. <Column size="109" band="left"/>
  34. <Column size="56"/>
  35. <Column size="60"/>
  36. <Column size="61"/>
  37. <Column size="80"/>
  38. <Column size="77"/>
  39. <Column size="45"/>
  40. <Column size="40"/>
  41. <Column size="64"/>
  42. <Column size="39"/>
  43. <Column size="45"/>
  44. <Column size="68"/>
  45. <Column size="38"/>
  46. <Column size="23"/>
  47. <Column size="43"/>
  48. <Column size="24"/>
  49. <Column size="41"/>
  50. <Column size="23"/>
  51. <Column size="43"/>
  52. <Column size="24"/>
  53. <Column size="100"/>
  54. <Column size="59"/>
  55. <Column size="62"/>
  56. <Column size="64"/>
  57. <Column size="58"/>
  58. <Column size="73"/>
  59. <Column size="67"/>
  60. <Column size="74"/>
  61. <Column size="76"/>
  62. <Column size="87"/>
  63. </Columns>
  64. <Rows>
  65. <Row size="24" band="head"/>
  66. <Row size="24" band="head"/>
  67. <Row size="24" band="head"/>
  68. <Row size="24"/>
  69. </Rows>
  70. <Band id="head">
  71. <Cell rowspan="3" taborder="undefined"/>
  72. <Cell col="1" rowspan="3" text="약품코드" taborder="undefined"/>
  73. <Cell col="2" colspan="5" text="전일재고" taborder="undefined"/>
  74. <Cell col="7" colspan="15" text="출고" taborder="undefined"/>
  75. <Cell col="22" colspan="3" text="입고/이송" taborder="undefined"/>
  76. <Cell col="25" colspan="5" text="당일재고" taborder="undefined"/>
  77. <Cell col="30" rowspan="3" text="당월 누적사용" wordwrap="word" taborder="undefined"/>
  78. <Cell row="1" col="2" rowspan="2" text="창고" taborder="undefined"/>
  79. <Cell row="1" col="3" rowspan="2" text="병동약국" taborder="undefined"/>
  80. <Cell row="1" col="4" rowspan="2" text="외래약국" taborder="undefined"/>
  81. <Cell row="1" col="5" rowspan="2" text="병동상비품" taborder="undefined"/>
  82. <Cell row="1" col="6" rowspan="2" text="병원총재고" taborder="undefined"/>
  83. <Cell row="1" col="7" colspan="3" text="병동약국" taborder="undefined"/>
  84. <Cell row="1" col="10" colspan="3" text="외래약국" taborder="undefined"/>
  85. <Cell row="1" col="13" colspan="8" text="비고수량/출고구분" taborder="undefined"/>
  86. <Cell row="1" col="21" rowspan="2" text="비고기록" taborder="undefined"/>
  87. <Cell row="1" col="22" rowspan="2" text="창고입고" taborder="undefined"/>
  88. <Cell row="1" col="23" colspan="2" text="이송" taborder="undefined"/>
  89. <Cell row="1" col="25" rowspan="2" text="창고" taborder="undefined"/>
  90. <Cell row="1" col="26" rowspan="2" text="병동약국" taborder="undefined"/>
  91. <Cell row="1" col="27" rowspan="2" text="외래약국" taborder="undefined"/>
  92. <Cell row="1" col="28" rowspan="2" text="병동상비품" taborder="undefined"/>
  93. <Cell row="1" col="29" rowspan="2" text="병원총재고" taborder="undefined"/>
  94. <Cell row="2" col="7" text="출고"/>
  95. <Cell row="2" col="8" text="반환"/>
  96. <Cell row="2" col="9" text="출고-반환"/>
  97. <Cell row="2" col="10" text="출고"/>
  98. <Cell row="2" col="11" text="반환"/>
  99. <Cell row="2" col="12" text="출고-반환"/>
  100. <Cell row="2" col="13" colspan="2" text="D0" taborder="undefined"/>
  101. <Cell row="2" col="15" colspan="2" text="D1" taborder="undefined"/>
  102. <Cell row="2" col="17" colspan="2" text="D2" taborder="undefined"/>
  103. <Cell row="2" col="19" colspan="2" text="N" taborder="undefined"/>
  104. <Cell row="2" col="23" text="병동약국"/>
  105. <Cell row="2" col="24" text="외래약국"/>
  106. </Band>
  107. <Band id="body">
  108. <Cell celltype="head"/>
  109. <Cell col="1" text="bind:drugcd"/>
  110. <Cell col="2" displaytype="number" edittype="masknumber" text="bind:bf_warestocqty" mask="expr:utlf_isNull(bf_warestocqty) ? &quot;&quot; : &quot;0.09&quot;"/>
  111. <Cell col="3" displaytype="number" edittype="masknumber" text="bind:bf_instocqty" mask="expr:utlf_isNull(bf_instocqty) ? &quot;&quot; : &quot;0.09&quot;"/>
  112. <Cell col="4" displaytype="number" edittype="masknumber" text="bind:bf_outstocqty" mask="expr:utlf_isNull(bf_outstocqty) ? &quot;&quot; : &quot;0.09&quot;"/>
  113. <Cell col="5" displaytype="number" edittype="masknumber" text="bind:bf_fixstocqty" mask="expr:utlf_isNull(bf_fixstocqty) ? &quot;&quot; : &quot;0.09&quot;"/>
  114. <Cell col="6" displaytype="number" edittype="masknumber" text="bind:bf_totstocqty" mask="expr:utlf_isNull(bf_totstocqty) ? &quot;&quot; : &quot;0.09&quot;"/>
  115. <Cell col="7" displaytype="number" text="bind:indeleqty" mask="0.09" editautoselect="true" editacceptsenter="false"/>
  116. <Cell col="8" displaytype="number" text="bind:inrtnqty" mask="0.09"/>
  117. <Cell col="9" displaytype="number" text="bind:inrealdeleqty" mask="0.09"/>
  118. <Cell col="10" displaytype="number" text="bind:outdeleqty" mask="0.09"/>
  119. <Cell col="11" displaytype="number" text="bind:outrtnqty" mask="0.09"/>
  120. <Cell col="12" displaytype="number" text="bind:outrealdeleqty" mask="0.09"/>
  121. <Cell col="13" displaytype="number" edittype="masknumber" text="bind:remqty1" mask="expr:utlf_isNull(remqty1) ? &quot;&quot;:&quot;0.09&quot;" editautoselect="true"/>
  122. <Cell col="14" displaytype="combo" edittype="combo" text="bind:remflag1" editautoselect="true" combodataset="ds_init_remflag" combocodecol="cdid" combodatacol="cdnm"/>
  123. <Cell col="15" displaytype="number" edittype="masknumber" text="bind:remqty2" mask="expr:utlf_isNull(remqty2) ? &quot;&quot;:&quot;0.09&quot;" editautoselect="true"/>
  124. <Cell col="16" displaytype="combo" edittype="combo" text="bind:remflag2" editautoselect="true" combodataset="ds_init_remflag" combocodecol="cdid" combodatacol="cdnm"/>
  125. <Cell col="17" displaytype="number" edittype="masknumber" text="bind:remqty3" mask="expr:utlf_isNull(remqty1) ? &quot;&quot;:&quot;0.09&quot;" editautoselect="true"/>
  126. <Cell col="18" displaytype="combo" edittype="combo" text="bind:remflag3" editautoselect="true" combodataset="ds_init_remflag" combocodecol="cdid" combodatacol="cdnm"/>
  127. <Cell col="19" displaytype="number" edittype="masknumber" text="bind:remqty4" mask="expr:utlf_isNull(remqty1) ? &quot;&quot;:&quot;0.09&quot;" editautoselect="true"/>
  128. <Cell col="20" displaytype="combo" edittype="combo" text="bind:remflag4" editautoselect="true" combodataset="ds_init_remflag" combocodecol="cdid" combodatacol="cdnm"/>
  129. <Cell col="21" displaytype="text" edittype="text" text="bind:remcmt" editautoselect="true"/>
  130. <Cell col="22" displaytype="number" text="bind:winqty" mask="0.09"/>
  131. <Cell col="23" displaytype="number" text="bind:intranqty" mask="0.09"/>
  132. <Cell col="24" displaytype="number" text="bind:outtranqty" mask="0.09"/>
  133. <Cell col="25" displaytype="number" text="bind:warestocqty" mask="0.09"/>
  134. <Cell col="26" displaytype="number" text="bind:instocqty" mask="0.09"/>
  135. <Cell col="27" displaytype="number" text="bind:outstocqty" mask="0.09"/>
  136. <Cell col="28" displaytype="number" text="bind:fixstocqty" mask="0.09"/>
  137. <Cell col="29" displaytype="number" text="bind:totstocqty" mask="0.09"/>
  138. <Cell col="30" displaytype="number" text="bind:monthsum" mask="0.09"/>
  139. </Band>
  140. </Format>
  141. </Formats>
  142. </Grid>
  143. <Button position="absolute 877 768 981 790" id="button19" class="btn6" text="수불대장출력" onclick="button19_onclick"/>
  144. <CheckBox position="absolute 797 768 865 787" id="checkbox2" class="checkbox_search" text="미리보기"/>
  145. <Static id="caption19" text="마약일계표" class="tit_1" position="absolute 0 0 211 25"/>
  146. <Button id="btn_d1" taborder="1" text="1" position="absolute 0 75 33 98" visible="false" onclick="Button_onclick" class="btn_tab"/>
  147. <Button id="btn_d2" taborder="2" text="2" class="btn_tab" position="absolute 33 75 66 98" visible="false" onclick="Button_onclick"/>
  148. <Button id="btn_d3" taborder="3" text="3" class="btn_tab" position="absolute 66 75 99 98" visible="false" onclick="Button_onclick"/>
  149. <Button id="btn_d4" taborder="4" text="4" class="btn_tab" position="absolute 99 75 132 98" visible="false" onclick="Button_onclick"/>
  150. <Button id="btn_d5" taborder="5" text="5" class="btn_tab" position="absolute 132 75 165 98" visible="false" onclick="Button_onclick"/>
  151. <Button id="btn_d6" taborder="6" text="6" class="btn_tab" position="absolute 165 75 198 98" visible="false" onclick="Button_onclick"/>
  152. <Button id="btn_d7" taborder="7" text="7" class="btn_tab" position="absolute 198 75 231 98" visible="false" onclick="Button_onclick"/>
  153. <Button id="btn_d8" taborder="8" text="8" class="btn_tab" position="absolute 231 75 264 98" visible="false" onclick="Button_onclick"/>
  154. <Button id="btn_d9" taborder="9" text="9" class="btn_tab" position="absolute 264 75 297 98" visible="false" onclick="Button_onclick"/>
  155. <Button id="btn_d10" taborder="10" text="10" class="btn_tab" position="absolute 297 75 330 98" visible="false" onclick="Button_onclick"/>
  156. <Button id="btn_d11" taborder="11" text="11" class="btn_tab" position="absolute 330 75 363 98" visible="false" onclick="Button_onclick"/>
  157. <Button id="btn_d12" taborder="12" text="12" class="btn_tab" position="absolute 363 75 396 98" visible="false" onclick="Button_onclick"/>
  158. <Button id="btn_d13" taborder="13" text="13" class="btn_tab" position="absolute 396 75 429 98" visible="false" onclick="Button_onclick"/>
  159. <Button id="btn_d14" taborder="14" text="14" class="btn_tab" position="absolute 429 75 462 98" visible="false" onclick="Button_onclick"/>
  160. <Button id="btn_d15" taborder="15" text="15" class="btn_tab" position="absolute 462 75 495 98" visible="false" onclick="Button_onclick"/>
  161. <Button id="btn_d16" taborder="16" text="16" class="btn_tab" position="absolute 495 75 528 98" visible="false" onclick="Button_onclick"/>
  162. <Button id="btn_d17" taborder="17" text="17" class="btn_tab" position="absolute 528 75 561 98" visible="false" onclick="Button_onclick"/>
  163. <Button id="btn_d18" taborder="18" text="18" class="btn_tab" position="absolute 561 75 594 98" visible="false" onclick="Button_onclick"/>
  164. <Button id="btn_d19" taborder="19" text="19" class="btn_tab" position="absolute 594 75 627 98" visible="false" onclick="Button_onclick"/>
  165. <Button id="btn_d20" taborder="20" text="20" class="btn_tab" position="absolute 627 75 660 98" visible="false" onclick="Button_onclick"/>
  166. <Button id="btn_d21" taborder="21" text="21" class="btn_tab" position="absolute 660 75 693 98" visible="false" onclick="Button_onclick"/>
  167. <Button id="btn_d22" taborder="22" text="22" class="btn_tab" position="absolute 693 75 726 98" visible="false" onclick="Button_onclick"/>
  168. <Button id="btn_d23" taborder="23" text="23" class="btn_tab" position="absolute 726 75 759 98" visible="false" onclick="Button_onclick"/>
  169. <Button id="btn_d24" taborder="24" text="24" class="btn_tab" position="absolute 759 75 792 98" visible="false" onclick="Button_onclick"/>
  170. <Button id="btn_d25" taborder="25" text="25" class="btn_tab" position="absolute 792 75 825 98" visible="false" onclick="Button_onclick"/>
  171. <Button id="btn_d26" taborder="26" text="26" class="btn_tab" position="absolute 825 75 858 98" visible="false" onclick="Button_onclick"/>
  172. <Button id="btn_d27" taborder="27" text="27" class="btn_tab" position="absolute 858 75 891 98" visible="false" onclick="Button_onclick"/>
  173. <Button id="btn_d28" taborder="28" text="28" class="btn_tab" position="absolute 891 75 924 98" visible="false" onclick="Button_onclick"/>
  174. <Button id="btn_d29" taborder="29" text="29" class="btn_tab" position="absolute 924 75 957 98" visible="false" onclick="Button_onclick"/>
  175. <Button id="btn_d30" taborder="30" text="30" class="btn_tab" position="absolute 957 75 990 98" visible="false" onclick="Button_onclick"/>
  176. <Button id="btn_d31" taborder="31" text="31" class="btn_tab" position="absolute 990 75 1023 98" visible="false" onclick="Button_onclick"/>
  177. </Layout>
  178. </Layouts>
  179. <Objects>
  180. <Dataset id="ds_grd_narclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  181. <ColumnInfo>
  182. <Column id="drugcd" type="STRING"/>
  183. <Column id="bf_warestocqty" type="STRING"/>
  184. <Column id="bf_instocqty" type="STRING"/>
  185. <Column id="bf_outstocqty" type="STRING"/>
  186. <Column id="bf_fixstocqty" type="STRING"/>
  187. <Column id="bf_totstocqty" type="STRING"/>
  188. <Column id="indeleqty" type="STRING"/>
  189. <Column id="inrtnqty" type="STRING"/>
  190. <Column id="inrealdeleqty" type="STRING"/>
  191. <Column id="outdeleqty" type="STRING"/>
  192. <Column id="outrtnqty" type="STRING"/>
  193. <Column id="outrealdeleqty" type="STRING"/>
  194. <Column id="remqty1" type="STRING"/>
  195. <Column id="remflag1" type="STRING"/>
  196. <Column id="remqty2" type="STRING"/>
  197. <Column id="remflag2" type="STRING"/>
  198. <Column id="remqty3" type="STRING"/>
  199. <Column id="remflag3" type="STRING"/>
  200. <Column id="remqty4" type="STRING"/>
  201. <Column id="remflag4" type="STRING"/>
  202. <Column id="remcmt" type="STRING"/>
  203. <Column id="winqty" type="STRING"/>
  204. <Column id="intranqty" type="STRING"/>
  205. <Column id="outtranqty" type="STRING"/>
  206. <Column id="warestocqty" type="STRING"/>
  207. <Column id="instocqty" type="STRING"/>
  208. <Column id="outstocqty" type="STRING"/>
  209. <Column id="fixstocqty" type="STRING"/>
  210. <Column id="totstocqty" type="STRING"/>
  211. <Column id="monthsum" type="STRING"/>
  212. </ColumnInfo>
  213. </Dataset>
  214. <Dataset id="ds_main_prntlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  215. <Dataset id="ds_send_srchinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  216. <ColumnInfo>
  217. <Column id="yyyymm" type="STRING" size="256"/>
  218. <Column id="dd" type="STRING" size="256"/>
  219. </ColumnInfo>
  220. <Rows>
  221. <Row/>
  222. </Rows>
  223. </Dataset>
  224. <Dataset id="ds_send_saveinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  225. <ColumnInfo>
  226. <Column id="data1" type="STRING" size="256"/>
  227. </ColumnInfo>
  228. <Rows>
  229. <Row/>
  230. </Rows>
  231. </Dataset>
  232. <Dataset id="ds_send_print1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  233. <Dataset id="ds_send_srchdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  234. <ColumnInfo>
  235. <Column id="preview" type="STRING" size="256"/>
  236. </ColumnInfo>
  237. <Rows>
  238. <Row/>
  239. </Rows>
  240. </Dataset>
  241. <Dataset id="ds_init_remflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  242. <ColumnInfo>
  243. <Column id="cdid" type="STRING" size="256"/>
  244. <Column id="cdnm" type="STRING" size="256"/>
  245. </ColumnInfo>
  246. <Rows>
  247. <Row/>
  248. <Row>
  249. <Col id="cdnm">병동약국재고 출고</Col>
  250. <Col id="cdid">1</Col>
  251. </Row>
  252. <Row>
  253. <Col id="cdnm">창고재고 출고</Col>
  254. <Col id="cdid">2</Col>
  255. </Row>
  256. <Row>
  257. <Col id="cdnm">병동약국재고 -&gt; 상비품 이동</Col>
  258. <Col id="cdid">3</Col>
  259. </Row>
  260. <Row>
  261. <Col id="cdnm">창고재고 -&gt; 상비품 이동</Col>
  262. <Col id="cdid">4</Col>
  263. </Row>
  264. </Rows>
  265. </Dataset>
  266. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  267. </Objects>
  268. <Bind/>
  269. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  270. * System Name :
  271. * Job Name :
  272. * Creator :
  273. * Make Date : 2015-11-13
  274. * Description :
  275. *---------------------------------------------------------------------------------------
  276. * Modify Date Modifier Modify Description
  277. *---------------------------------------------------------------------------------------
  278. * 2015-11-13 Live Converter TF->XP
  279. *
  280. *---------------------------------------------------------------------------------------
  281. ****************************************************************************************/
  282. include "com_commonxp::comm_main.xjs";
  283. var arErrorCode = new HashArray();
  284. /******************************************************************
  285. * Argument :
  286. * Description : 초기화
  287. ******************************************************************/
  288. function SMADT30900_oninit(obj:Form, e:InitEventInfo)
  289. {
  290. frmf_initForm(obj);
  291. }
  292. function SMADT30900_onload(obj:Form, e:LoadEventInfo)
  293. {
  294. //row 상태값 설정
  295. grdf_setRowTypeIcon(grd_narclist, 0);
  296. ds_send_srchinfo.setColumn(0, "yyyymm", utlf_getCurrentDate().substr(0,6));
  297. fSetTab();
  298. //조회기간 달력 set
  299. group3.group2.ipt_fstdd.setData(ds_send_srchinfo.getColumn(0, "yyyymm"));
  300. //조회기간 event
  301. group3.group2.ipt_fstdd.setCallEvent("fn_Cal");
  302. }
  303. /******************************************************************
  304. * Argument :
  305. * Description : 조회기간(fromdd) event
  306. ******************************************************************/
  307. function fn_Cal(){
  308. var fromdd = group3.group2.ipt_fstdd.getData();
  309. ds_send_srchinfo.setColumn(0, "yyyymm", fromdd);
  310. fSetTab();
  311. }
  312. /******************************************************************
  313. * Argument :
  314. * Description : Tab설정
  315. ******************************************************************/
  316. function fSetTab(){
  317. var terms = ds_send_srchinfo.getColumn(0, "yyyymm")+ "01";
  318. var lastDate = utlf_getLastDate(terms);
  319. lastDate = lastDate.substr(6,2);
  320. var tabButton = "";
  321. var no = "";
  322. if( utlf_isNull(lastDate) ) {
  323. return false;
  324. }
  325. for( var i = 1; i < 32 ; i++ ){
  326. if( i <= lastDate ) {
  327. no = (i+1).toString();
  328. tabButton = "btn_d" + i
  329. components[tabButton].visible = true;
  330. } else {
  331. no = (i+1).toString();
  332. tabButton = "btn_d" + i
  333. components[tabButton].visible = false;
  334. }
  335. }
  336. }
  337. /******************************************************************
  338. * Argument :
  339. * Description : 조회년월 event
  340. ******************************************************************/
  341. function group3_group2_ipt_fstdd_onchanged(obj:Calendar, e:ChangeEventInfo)
  342. {
  343. fSetTab();
  344. }
  345. /******************************************************************
  346. * Argument :
  347. * Description : Tab Button event
  348. ******************************************************************/
  349. function Button_onclick(obj:Button, e:ClickEventInfo)
  350. {
  351. var btn_text = obj.text;
  352. var btn_dd = Number(btn_text);
  353. if( btn_dd > 0 && btn_dd < 32 ){
  354. if( btn_dd < 10 ) {
  355. ds_send_srchinfo.setColumn(0, "dd" , "0" + btn_text);
  356. } else {
  357. ds_send_srchinfo.setColumn(0, "dd" , btn_text);
  358. }
  359. ds_send_srchinfo.setColumn(0, "yyyymm", ds_send_srchinfo.getColumn(0, "yyyymm").substr(0,6));
  360. var oParam = {};
  361. oParam.id = "TRADT30901";
  362. oParam.service = "pharmacyprescriptionapp.Narcotics";
  363. oParam.method = "reqGetNarcDayList";
  364. oParam.inds = "req=ds_send_srchinfo";
  365. oParam.outds = "ds_grd_narclist=narclist";
  366. oParam.async = false;
  367. oParam.callback = "cf_TRADT30901";
  368. tranf_submit(oParam);
  369. lf_btn_Selected(obj.name);
  370. }
  371. }
  372. function cf_TRADT30901(sSvcId, nErrorCode, sErrorMsg) {
  373. if(nErrorCode < 0) return;
  374. dsf_setTypeFormat(ds_grd_narclist, "bf_warestocqty:FLOAT^bf_instocqty:FLOAT^bf_outstocqty:FLOAT^bf_fixstocqty:FLOAT^bf_totstocqty:FLOAT^indeleqty:FLOAT^inrtnqty:FLOAT^inrealdeleqty:FLOAT^outdeleqty:FLOAT^outrtnqty:FLOAT^outrealdeleqty:FLOAT^remqty:FLOAT^winqty:FLOAT^intranqty:FLOAT^outtranqty:FLOAT^warestocqty:FLOAT^instocqty:FLOAT^outstocqty:FLOAT^fixstocqty:FLOAT^totstocqty:FLOAT^monthsum:FLOAT^remqty1:FLOAT^remqty2:FLOAT^remqty3:FLOAT^remqty4:FLOAT");
  375. }
  376. /****************************************************************************************
  377. * Function : lf_btn_Selected
  378. * Description : 버튼 선택상태 설정
  379. * Argument : 01.btnId : 활성화 버튼 ID
  380. * retrun type :
  381. * Creator :
  382. ****************************************************************************************/
  383. function lf_btn_Selected(btnId){
  384. if( utlf_isNull(btnId) ) return;
  385. var cmpId = btnId.substring(5,btnId.length);
  386. for( var i = 1; i < 32; i++ ){
  387. if( i == cmpId){
  388. var btnObj = this.components["btn_d"+i];
  389. btnObj.setSelectStatus(true);
  390. btnObj.class = "btn_tab_S";
  391. }else{
  392. var btnObj = this.components["btn_d"+i];
  393. btnObj.setSelectStatus(false);
  394. btnObj.class = "btn_tab";
  395. }
  396. }
  397. }
  398. /******************************************************************
  399. * Argument :
  400. * Description : 일계표 재고반영 Button event
  401. ******************************************************************/
  402. function group3_button1_onclick(obj:Button, e:ClickEventInfo)
  403. {
  404. //ds_send_saveinfo.setColumn(0, "data1", dsf_getDsCSV(ds_grd_narclist));
  405. ds_send_saveinfo.copyData(ds_grd_narclist);
  406. //dsf_setTypeFormat(ds_send_saveinfo, "warestocqty:FLOAT^instocqty:FLOAT^outstocqty:FLOAT^fixstocqty:FLOAT^totstocqty:FLOAT");
  407. var oParam = {};
  408. oParam.id = "TXADT30902";
  409. oParam.service = "pharmacyprescriptionapp.Narcotics";
  410. oParam.method = "reqExeNarcDayListStoc";
  411. oParam.inds = "req=ds_send_srchinfo data1=ds_send_saveinfo";
  412. oParam.outds = "ds_hidden=item";
  413. oParam.async = false;
  414. oParam.callback = "cf_TXADT30902";
  415. tranf_submit(oParam);
  416. }
  417. function cf_TXADT30902(sSvcId, nErrorCode, sErrorMsg) {
  418. if(nErrorCode < 0) return;
  419. var oParam = {};
  420. oParam.id = "TRADT30901";
  421. oParam.service = "pharmacyprescriptionapp.Narcotics";
  422. oParam.method = "reqGetNarcDayList";
  423. oParam.inds = "req=ds_send_srchinfo";
  424. oParam.outds = "ds_grd_narclist=narclist";
  425. oParam.async = false;
  426. oParam.callback = "cf_TRADT30901";
  427. tranf_submit(oParam);
  428. }
  429. /******************************************************************
  430. * Argument :
  431. * Description : 상비품/비고 저장 Button event
  432. ******************************************************************/
  433. function group3_btn_prcp_onclick(obj:Button, e:ClickEventInfo)
  434. {
  435. var oDsUpdate = grdf_getGridUpdateData(grd_narclist);
  436. if( oDsUpdate.rowcount < 1 ){
  437. sysf_messageBox("업데이트 정보가 없습니다.", "I");
  438. return;
  439. } else {
  440. for(var i = 0 ; i < ds_grd_narclist.rowcount; i++ ){
  441. if( utlf_isNull(ds_grd_narclist.getColumn(i, "remflag1")) && !utlf_isNull(ds_grd_narclist.getColumn(i, "remqty1")) ) {
  442. sysf_messageBox("D0의 비고수량이 입력되었으므로 출고구분을 선택하여 주십시오.", "I");
  443. return;
  444. }
  445. if( utlf_isNull(ds_grd_narclist.getColumn(i, "remflag2")) && !utlf_isNull(ds_grd_narclist.getColumn(i, "remqty2")) ) {
  446. sysf_messageBox("D1의 비고수량이 입력되었으므로 출고구분을 선택하여 주십시오.", "I");
  447. return;
  448. }
  449. if( utlf_isNull(ds_grd_narclist.getColumn(i, "remflag3")) && !utlf_isNull(ds_grd_narclist.getColumn(i, "remqty3")) ) {
  450. sysf_messageBox("D2의 비고수량이 입력되었으므로 출고구분을 선택하여 주십시오.", "I");
  451. return;
  452. }
  453. if( utlf_isNull(ds_grd_narclist.getColumn(i, "remflag4")) && !utlf_isNull(ds_grd_narclist.getColumn(i, "remqty4")) ) {
  454. messageBox("N의 비고수량이 입력되었으므로 출고구분을 선택하여 주십시오.", "I");
  455. sysf_return0;
  456. }
  457. }
  458. grdf_setStatusColumn(oDsUpdate, "m"); // 각행의 status에 rowType 값에 따라 'i', 'u', 'd'로 업데이트 시켜준다
  459. ds_send_saveinfo.copyData(oDsUpdate, true);
  460. dsf_setTypeFormat(ds_send_saveinfo, "bf_warestocqty:FLOAT^bf_instocqty:FLOAT^bf_outstocqty:FLOAT^bf_fixstocqty:FLOAT^bf_totstocqty:FLOAT^remqty:FLOAT^remqty1:FLOAT^remqty2:FLOAT^remqty3:FLOAT^remqty4:FLOAT");
  461. var oParam = {};
  462. oParam.id = "TXADT30901";
  463. oParam.service = "pharmacyprescriptionapp.Narcotics";
  464. oParam.method = "reqExeNarcDayList";
  465. oParam.inds = "req=ds_send_srchinfo data1=ds_send_saveinfo";
  466. oParam.outds = "ds_hidden=item";
  467. oParam.async = false;
  468. oParam.callback = "cf_TXADT30901";
  469. tranf_submit(oParam);
  470. }
  471. }
  472. function cf_TXADT30901(sSvcId, nErrorCode, sErrorMsg) {
  473. if(nErrorCode < 0) return;
  474. var oParam = {};
  475. oParam.id = "TRADT30901";
  476. oParam.service = "pharmacyprescriptionapp.Narcotics";
  477. oParam.method = "reqGetNarcDayList";
  478. oParam.inds = "req=ds_send_srchinfo";
  479. oParam.outds = "ds_grd_narclist=narclist";
  480. oParam.async = false;
  481. oParam.callback = "cf_TRADT30901";
  482. tranf_submit(oParam);
  483. }
  484. /******************************************************************
  485. * Argument :
  486. * Description : 수불대장출력 Button event
  487. ******************************************************************/
  488. function button19_onclick(obj:Button, e:ClickEventInfo)
  489. {
  490. //수불대장 조회
  491. var oParam = {};
  492. oParam.id = "TRADT30903";
  493. oParam.service = "pharmacyprescriptionapp.Narcotics";
  494. oParam.method = "reqGetNarcDayPrntList";
  495. oParam.inds = "req=ds_send_srchinfo";
  496. oParam.outds = "ds_send_print1=item";
  497. oParam.async = false;
  498. oParam.callback = "cf_TRADT30903";
  499. tranf_submit(oParam);
  500. ds_send_srchdata.addColumn("enddd", "string", 256);
  501. ds_send_srchdata.addColumn("stocprntyn", "string", 256);
  502. ds_send_srchdata.setColumn(0, "enddd", ds_send_print1.getColumn(0, "enddd"));
  503. ds_send_srchdata.setColumn(0, "stocprntyn", "Y");
  504. var objDOM = rptf_createDOM(); // DOM 객체 설정
  505. rptf_setNodeListToDOM(objDOM, "/root/send/data/print1/item", ds_send_print1); // 데이터셋 1
  506. rptf_setNodeListToDOM(objDOM, "/root/send/srchdata", ds_send_srchinfo); // 데이터셋 2
  507. var objParam = new Object();
  508. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  509. if( !utlf_isNull(ds_send_srchdata.getColumn(0, "enddd")) ) {
  510. if( checkbox2.value == 1 ){ //미리보기가 체크된 경우
  511. var option = "open=1;save=1;directprint=0;printdialog=1;print=1;zoom=0;";
  512. } else {
  513. var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0;";
  514. }
  515. rptf_exeReportPreview30(["RPADT30302"],[objParam], option);
  516. ds_send_print1.clearData();
  517. }
  518. }
  519. function cf_TRADT30903(sSvcId, nErrorCode, sErrorMsg) {
  520. if(nErrorCode < 0) return;
  521. ds_send_print1.updateColID("stocdd","enddd");
  522. ds_send_print1.updateColID("drugcd","narccd");
  523. }
  524. /******************************************************************
  525. * Argument :
  526. * Description : 수불대장출력 Button event
  527. ******************************************************************/
  528. function button8_onclick(obj:Button, e:ClickEventInfo)
  529. {
  530. var oParam = {};
  531. oParam.id = "TRADT30902";
  532. oParam.service = "pharmacyprescriptionapp.Narcotics";
  533. oParam.method = "reqGetNarcDaySumPrntList";
  534. oParam.inds = "req=ds_send_srchinfo";
  535. oParam.outds = "ds_main_prntlist=narclist";
  536. oParam.async = false;
  537. //oParam.callback = "cf_TRADT30902";
  538. tranf_submit(oParam);
  539. var objDOM = rptf_createDOM(); // DOM 객체 설정
  540. rptf_setNodeListToDOM(objDOM, "/root/main/prntlist/narclist", ds_main_prntlist); // 데이터셋 1
  541. var objParam = new Object();
  542. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  543. if( checkbox2.value == 1 ){ //미리보기가 체크된 경우
  544. var option = "open=1;save=1;directprint=0;printdialog=1;print=1;zoom=0;";
  545. } else {
  546. var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0;";
  547. }
  548. rptf_exeReportPreview30(["RPADT30901"],[objParam], option);
  549. }
  550. /******************************************************************
  551. * Argument :
  552. * Description : 수불대장출력 Button event
  553. ******************************************************************/
  554. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  555. {
  556. if( ds_grd_narclist.rowcount > 0 ){
  557. grdf_exportExcel(grd_narclist, "마약일계표", "마약일계표", false, "", "none", false);
  558. } else {
  559. sysf_messageBox("조회된 데이터가 ", "I004");
  560. }
  561. }
  562. ]]></Script>
  563. </Form>
  564. </FDL>