SPMNW18010_기자재현황통계.xfdl 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMNW18010" position="absolute 0 0 760 750" titletext="장비이용도 사용현황 통계" oninit="SPMNW18010_oninit" onload="SPMNW18010_onload" ontimer="SPMNW18010_ontimer">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 0 750 740" id="group3" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Static text="장비이용도 사용현황 통계" position="absolute 0 0 191 20" id="cpt_title" class="tit_1" anchor="default"/>
  11. <Div position="absolute 0 20 750 60" align="align:center top;" id="grp_sea" class="div_SA" anchor="default">
  12. <Layouts>
  13. <Layout>
  14. <Button position="absolute 630 11 686 33" id="btn_ref" class="btn1" taborder="7" text="조회" anchor="default" onclick="group3_grp_sea_btn_ref_onclick"/>
  15. <Static text="업무일자 :" position="absolute 205 12 280 29" id="caption3" class="search_name" anchor="default"/>
  16. <Shape position="absolute 617 10 623 31" linetype="vertical" id="line2" class="line_4" anchor="default"/>
  17. <Calendar position="absolute 280 10 368 29" id="ipt_fromdd" class="input_s_essential" taborder="2" autoselect="true" anchor="default" onchanged="group3_grp_sea_ipt_fromdd_onchanged"/>
  18. <Static text="부 서 :" position="absolute 10 12 67 29" id="caption29" class="search_name" anchor="default"/>
  19. <Combo position="absolute 65 11 180 30" id="cmb_deptcd" class="combo_s_essential" taborder="1" innerdataset="@ds_init_dept_dept" datacolumn="depthngnm" codecolumn="deptcd" anchor="default" onitemchanged="group3_grp_sea_cmb_deptcd_onitemchanged"/>
  20. <Static text="자산명 :" position="absolute 410 12 473 29" id="caption1" class="search_name" anchor="default"/>
  21. <Button position="absolute 688 11 744 33" id="button2" class="btn7" taborder="8" text="엑셀" anchor="default" onclick="group3_grp_sea_button2_onclick"/>
  22. <Combo position="absolute 470 11 585 30" id="cmb_goodcd" class="combo_s_essential" taborder="1" innerdataset="@ds_codelist" datacolumn="cdnm" codecolumn="supcdid" anchor="default" onitemchanged="group3_grp_sea_cmb_goodcd_onitemchanged"/>
  23. </Layout>
  24. </Layouts>
  25. </Div>
  26. <Shape position="absolute 0 65 750 71" linetype="horizontal" id="line1" class="line_10" anchor="default"/>
  27. <Grid position="absolute 0 70 750 740" id="grd_goodinfo" class="datagrid2" binddataset="ds_main_goodinfo_goodlist" anchor="default" cellsizingtype="col" scrollpixel="all" cellsizebandtype="allband">
  28. <Formats>
  29. <Format id="default">
  30. <Columns>
  31. <Column size="20" band="left"/>
  32. <Column size="162"/>
  33. <Column size="0"/>
  34. <Column size="0"/>
  35. <Column size="200"/>
  36. <Column size="90"/>
  37. <Column size="65"/>
  38. <Column size="65"/>
  39. <Column size="65"/>
  40. <Column size="65"/>
  41. </Columns>
  42. <Rows>
  43. <Row size="24" band="head"/>
  44. <Row size="24"/>
  45. </Rows>
  46. <Band id="head">
  47. <Cell/>
  48. <Cell col="1" text="병동"/>
  49. <Cell col="2" text="wardcd"/>
  50. <Cell col="3" text="lrgcd"/>
  51. <Cell col="4" text="자산명"/>
  52. <Cell col="5" text="규격"/>
  53. <Cell col="6" text="보유재고"/>
  54. <Cell col="7" text="사용"/>
  55. <Cell col="8" text="미사용"/>
  56. <Cell col="9" text="사용률(%)"/>
  57. </Band>
  58. <Band id="body">
  59. <Cell celltype="head" expr="expr:currow + 1"/>
  60. <Cell col="1" text="bind:wardnm"/>
  61. <Cell col="2" text="bind:wardcd"/>
  62. <Cell col="3" text="bind:lrgcd"/>
  63. <Cell col="4" text="bind:goodnm"/>
  64. <Cell col="5" text="bind:goodspec"/>
  65. <Cell col="6" text="bind:tot"/>
  66. <Cell col="7" text="bind:using"/>
  67. <Cell col="8" text="bind:remain"/>
  68. <Cell col="9" edittype="none" text="bind:percent"/>
  69. </Band>
  70. </Format>
  71. </Formats>
  72. </Grid>
  73. </Layout>
  74. </Layouts>
  75. </Div>
  76. </Layout>
  77. </Layouts>
  78. <Objects>
  79. <Dataset id="ds_init_dept_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  80. <ColumnInfo>
  81. <Column id="depthngnm" type="STRING"/>
  82. <Column id="deptcd" type="STRING"/>
  83. </ColumnInfo>
  84. </Dataset>
  85. <Dataset id="ds_main_goodinfo_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  86. <ColumnInfo>
  87. <Column id="wardnm" type="STRING"/>
  88. <Column id="wardcd" type="STRING"/>
  89. <Column id="lrgcd" type="STRING"/>
  90. <Column id="goodnm" type="STRING"/>
  91. <Column id="goodspec" type="STRING"/>
  92. <Column id="tot" type="STRING"/>
  93. <Column id="using" type="STRING"/>
  94. <Column id="remain" type="STRING"/>
  95. <Column id="percent" type="STRING"/>
  96. </ColumnInfo>
  97. </Dataset>
  98. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  99. <ColumnInfo>
  100. <Column id="cdgrupid" type="STRING" size="256" sumtext="코드그룹ID"/>
  101. <Column id="srchdd" type="STRING" size="256" sumtext="조회기준일자"/>
  102. <Column id="flag" type="STRING" size="256" sumtext="조회기준일자"/>
  103. <Column id="allflag" type="STRING" size="256" sumtext="모두조회여부"/>
  104. </ColumnInfo>
  105. <Rows>
  106. <Row/>
  107. </Rows>
  108. </Dataset>
  109. <Dataset id="ds_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  110. <ColumnInfo>
  111. <Column id="cdgrupid" type="STRING" size="255"/>
  112. <Column id="cdid" type="STRING" size="255"/>
  113. <Column id="cdnm" type="STRING" size="255"/>
  114. <Column id="grupdetldesc" type="STRING" size="255"/>
  115. <Column id="supcdid" type="STRING" size="255"/>
  116. <Column id="sortseq" type="BIGDECIMAL" size="255"/>
  117. <Column id="valifromdd" type="STRING" size="255"/>
  118. <Column id="valitodd" type="STRING" size="255"/>
  119. </ColumnInfo>
  120. </Dataset>
  121. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  122. <ColumnInfo>
  123. <Column id="fromdd" type="STRING" size="256" sumtext="기간FROM"/>
  124. <Column id="deptcd" type="STRING" size="256" sumtext="부서"/>
  125. <Column id="goodcd" type="STRING" size="256" sumtext="기자재코드"/>
  126. </ColumnInfo>
  127. </Dataset>
  128. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  129. <ColumnInfo>
  130. <Column id="deptcd" type="STRING" size="256"/>
  131. <Column id="fromdd" type="STRING" size="256"/>
  132. <Column id="goodcd" type="STRING" size="256"/>
  133. </ColumnInfo>
  134. <Rows>
  135. <Row/>
  136. </Rows>
  137. </Dataset>
  138. </Objects>
  139. <Bind>
  140. <BindItem id="item0" compid="group3.grp_sea.cmb_deptcd" propid="value" datasetid="ds_main_cond" columnid="deptcd"/>
  141. <BindItem id="item1" compid="group3.grp_sea.ipt_fromdd" propid="value" datasetid="ds_main_cond" columnid="fromdd"/>
  142. <BindItem id="item2" compid="group3.grp_sea.cmb_goodcd" propid="value" datasetid="ds_main_cond" columnid="goodcd"/>
  143. </Bind>
  144. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  145. * System Name : 경대 의료정보시스템
  146. * Job Name : emr_wardcarexp -> SPMNW18010
  147. * Creator : yjh
  148. * Make Date : 2017-01-12
  149. * Description :
  150. *---------------------------------------------------------------------------------------
  151. * Modify Date Modifier Modify Description
  152. *---------------------------------------------------------------------------------------
  153. * 2017-01-12 yjh TF->XP
  154. *
  155. *---------------------------------------------------------------------------------------
  156. ****************************************************************************************/
  157. //=======================================================================================
  158. // Lib Include
  159. //---------------------------------------------------------------------------------------
  160. include "com_commonxp::comm_main.xjs";
  161. include "emr_carecomxp::CareCom.xjs";
  162. //=======================================================================================
  163. // Global Form Variable
  164. //---------------------------------------------------------------------------------------
  165. //=======================================================================================
  166. // Function
  167. //---------------------------------------------------------------------------------------
  168. function fSearch() {
  169. // model.removenode("/root/send");
  170. // model.makeNode("/root/send");
  171. ds_send_reqdata.copyData(ds_main_cond);
  172. var oParam = {};
  173. oParam.id = "TRMNW19301";
  174. oParam.service = "wardcareapp.TranMngt";
  175. oParam.method = "reqGetGoodStaticInfo";
  176. oParam.inds = "req=ds_send_reqdata";
  177. oParam.outds = "ds_main_goodinfo_goodlist=goodlist";
  178. oParam.async = false;
  179. //oParam.callback = "cf_TRMNW19301";
  180. tranf_submit(oParam);
  181. ds_main_goodinfo_goodlist.rowposition = -1;
  182. /*
  183. var nodePath = grd_ivinfo.nodeset;
  184. for(var i = grd_ivinfo.fixedRows; i < grd_ivinfo.rows; i++) {
  185. if (model.getValue(nodePath + "["+i+"]/disp1") == "Y") {
  186. grd_ivinfo.cellstyle("background-image", i, grd_ivinfo.colRef("disp1img")) = "../../../com/hismainweb/images/btn_top_infection0.gif";
  187. }else{
  188. grd_ivinfo.cellstyle("background-image", i, grd_ivinfo.colRef("disp1img")) = "";
  189. }
  190. if (model.getValue(nodePath + "["+i+"]/disp2") == "Y") {
  191. grd_ivinfo.cellstyle("background-image", i, grd_ivinfo.colRef("disp2img")) = "../../../com/hismainweb/images/btn_top_infection1.gif";
  192. }else{
  193. grd_ivinfo.cellstyle("background-image", i, grd_ivinfo.colRef("disp2img")) = "";
  194. }
  195. if (model.getValue(nodePath + "["+i+"]/disp3") == "Y") {
  196. grd_ivinfo.cellstyle("background-image", i, grd_ivinfo.colRef("disp3img")) = "../../../com/hismainweb/images/btn_top_infection2.gif";
  197. }else{
  198. grd_ivinfo.cellstyle("background-image", i, grd_ivinfo.colRef("disp3img")) = "";
  199. }
  200. }
  201. */
  202. }
  203. //=======================================================================================
  204. // Event
  205. //---------------------------------------------------------------------------------------
  206. /****************************************************************************************
  207. * Components : Form
  208. * Components ID : SPMNW18010
  209. * Event : oninit
  210. * Argument : 01.obj : Object Event has occurred
  211. * : 02.e : Event Object
  212. * Description : 화면 처음 초기화시
  213. ****************************************************************************************/
  214. function SPMNW18010_oninit(obj:Form, e:InitEventInfo)
  215. {
  216. frmf_initForm(obj); //폼 초기화
  217. }
  218. /****************************************************************************************
  219. * Components : Form
  220. * Components ID : SPMNW18010
  221. * Event : onload
  222. * Argument : 01.obj : Object Event has occurred
  223. * : 02.e : Event Object
  224. * Description : 화면 로딩 완료시
  225. ****************************************************************************************/
  226. function SPMNW18010_onload(obj:Form, e:LoadEventInfo)
  227. {
  228. // 간호 하드코딩 조회
  229. ds_send.setColumn(0, "cdgrupid", "'402'");
  230. ds_send.setColumn(0, "srchdd" , utlf_getCurrentDate()); // 조회기준일자
  231. var oParam = {};
  232. oParam.id = "TRMNW00001";
  233. oParam.service = "wardcareapp.WardCareMngt";
  234. oParam.method = "reqGetNursHardCdInfo";
  235. oParam.inds = "req=ds_send";
  236. oParam.outds = "ds_codelist=codelist";
  237. oParam.async = false;
  238. //oParam.callback = "cf_TRMNW00001";
  239. tranf_submit(oParam);
  240. // 부서(병동) 목록 조회
  241. var instcd = sysf_getUserInfo("dutplceinstcd");
  242. var standard_yn = "orduseyn";
  243. var ord_deptflag = 'W';
  244. var rslt_ref = "ds_init_dept_dept";
  245. var sort_field = "depthngnm";
  246. var sort_method = "asc";
  247. var dt = utlf_getCurrentDate();
  248. appf_getDeptCodeList(instcd, standard_yn, ord_deptflag, sort_field, sort_method, dt, "", "", rslt_ref);
  249. //model.setValue(cmb_deptcd.attribute("ref"), getUserInfo("dutplcecd"));
  250. ds_main_cond.setColumn(0, "deptcd", "");
  251. ds_main_cond.setColumn(0, "goodcd", "");
  252. //submit("TRMNW11001", false); // 전체 부서조회
  253. frmf_addComboItem("group3.grp_sea.cmb_deptcd", "전 체", "", "above");
  254. ds_main_cond.setColumn(0, "fromdd", getDateAddc(utlf_getCurrentDate(),-1));
  255. //model.setValue(ipt_fromdd.attribute("ref"), getCurrentDate());
  256. // grd_goodinfo.mergeCol(1) = false;
  257. // grd_goodinfo.mergeCol(2) = false;
  258. // grd_goodinfo.mergeCol(3) = false;
  259. // //grd_goodinfo.mergeCol(4) = false;
  260. // grd_goodinfo.mergeCol(5) = false;
  261. // grd_goodinfo.mergeCol(6) = false;
  262. // grd_goodinfo.mergeCol(7) = false;
  263. // grd_goodinfo.mergeCol(8) = false;
  264. // grd_goodinfo.mergeCol(9) = false;
  265. /*
  266. if(model.getValue("/root/init/codeinfo/codelist[cdgrupid='I07' and supcdid ='"+userid+"']/supcdid") == userid) {
  267. } else { // IV팀이 아니면 비활성화
  268. if(getUserInfo("userid") == "ENR") {
  269. model.setValue(cmb_deptcd.attribute("ref"), "");
  270. cmb_deptcd.refresh();
  271. } else {
  272. model.setValue(cmb_deptcd.attribute("ref"), getUserInfo("dutplcecd"));
  273. cmb_deptcd.refresh();
  274. }
  275. }
  276. */
  277. //fSearch();
  278. this.setTimer(0, 100);
  279. }
  280. /****************************************************************************************
  281. * Components : Button
  282. * Components ID : btn_ref
  283. * Event : onclick
  284. * Argument : 01.obj : Object Event has occurred
  285. * : 02.e : Event Object
  286. * Description : 조회버튼 클릭시
  287. ****************************************************************************************/
  288. function group3_grp_sea_btn_ref_onclick(obj:Button, e:ClickEventInfo)
  289. {
  290. fSearch();
  291. }
  292. /****************************************************************************************
  293. * Components : Calendar
  294. * Components ID : ipt_fromdd
  295. * Event : onchanged
  296. * Argument : 01.obj : Object Event has occurred
  297. * : 02.e : Event Object
  298. * Description : 달력 값 변경시
  299. ****************************************************************************************/
  300. function group3_grp_sea_ipt_fromdd_onchanged(obj:Calendar, e:ChangeEventInfo)
  301. {
  302. fSearch();
  303. }
  304. /****************************************************************************************
  305. * Components : Combo
  306. * Components ID : cmb_deptcd
  307. * Event : onitemchanged
  308. * Argument : 01.obj : Object Event has occurred
  309. * : 02.e : Event Object
  310. * Description : 콤보 값 변경시
  311. ****************************************************************************************/
  312. function group3_grp_sea_cmb_deptcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  313. {
  314. fSearch();
  315. }
  316. /****************************************************************************************
  317. * Components : Button
  318. * Components ID : button2
  319. * Event : onclick
  320. * Argument : 01.obj : Object Event has occurred
  321. * : 02.e : Event Object
  322. * Description : 엑셀버튼 클릭시
  323. ****************************************************************************************/
  324. function group3_grp_sea_button2_onclick(obj:Button, e:ClickEventInfo)
  325. {
  326. if( group3.grd_goodinfo.rowcount > 0 ){
  327. grdf_exportExcel(group3.grd_goodinfo, "기자재사용현황통계", "SheetName", false, "", "user", false);
  328. } else {
  329. sysf_messageBox("조회된 데이터가 ", "I004");
  330. return;
  331. }
  332. }
  333. /****************************************************************************************
  334. * Components : Combo
  335. * Components ID : cmb_goodcd
  336. * Event : onitemchanged
  337. * Argument : 01.obj : Object Event has occurred
  338. * : 02.e : Event Object
  339. * Description : 콤보 값 변경시
  340. ****************************************************************************************/
  341. function group3_grp_sea_cmb_goodcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  342. {
  343. fSearch();
  344. }
  345. function SPMNW18010_ontimer(obj:Form, e:TimerEventInfo)
  346. {
  347. if( e.timerid == 0 ){
  348. this.killTimer(0);
  349. fSearch();
  350. }
  351. }
  352. ]]></Script>
  353. </Form>
  354. </FDL>