SMRNB00800_식수현황출력.xfdl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRNB00700" inheritanceid="" position="absolute 0 0 1024 768" titletext="식당이용현황" onload="SMRNB00800_onload" ontimer="SMRNB00800_ontimer">
  5. <Layouts>
  6. <Layout>
  7. <Static id="cap_title" text="식수현황출력" class="tit_1" position="absolute 0 0 120 25"/>
  8. <Static id="cap_time" position="absolute 758 1 1023 24" style="background:darkseagreen;padding:0 0 0 4;align:center middle;font:Dotum,10,bold;" anchor="top right"/>
  9. <Button id="btn_print" taborder="27" text="출력" class="btn6" position="absolute 908 26 964 48" anchor="top right" onclick="btn_print_onclick" visible="false"/>
  10. <Button id="btn_close" taborder="30" text="종료" class="btn4" position="absolute 967 26 1023 48" anchor="top right" onclick="btn_close_onclick"/>
  11. <Static id="cap_messege_title" position="absolute 116 741 233 764" anchor="left bottom" style="background:lightblue;padding:0 0 0 4;"/>
  12. <Static id="cap_messege" position="absolute 235 741 908 764" anchor="left bottom" style="background:lightblue;padding:0 0 0 4;font:Dotum,9,bold;"/>
  13. <Shape id="line7" class="line_6" position="absolute 0 47 1023 53" anchor="left top right"/>
  14. <Static id="caption1" text="출력물 미리보기" class="tit_2" position="absolute 0 99 133 115"/>
  15. <Shape id="line1" class="line_10" position="absolute 0 115 1023 121" anchor="left top right"/>
  16. <Div id="grp_search" taborder="34" class="div_SA2" position="absolute 0 51 1023 91" anchor="left top right" enable="true">
  17. <Layouts>
  18. <Layout>
  19. <Static id="cap_searchdd" text="조회기간" class="search_name" position="absolute 298 12 372 29" anchor="default"/>
  20. <Button id="btn_search" taborder="4" text="조회" onclick="grp_search_btn_search_onclick" class="btn1" position="absolute 953 9 1009 31" style="align:center;" anchor="top right"/>
  21. <Shape id="line7" linetype="vertical" class="line_4" position="absolute 938 7 941 34" anchor="top right"/>
  22. <Calendar id="ipt_fromdd" taborder="5" autoselect="true" class="input_essential" position="absolute 375 9 493 30" anchor="default" value="null" dateformat="yyyy-MM-dd ddd"/>
  23. <Static id="cap_01" text="~" position="absolute 497 12 509 28" anchor="default"/>
  24. <Calendar id="ipt_todd" taborder="6" autoselect="true" class="input_essential" position="absolute 511 9 629 30" anchor="default" dateformat="yyyy-MM-dd ddd"/>
  25. <Static id="cap_gubun" text="출력구분" class="search_name" position="absolute 10 12 84 29" anchor="default"/>
  26. <Combo id="cmb_gubun" taborder="7" position="absolute 87 9 259 29" index="0" codecolumn="codecolumn" datacolumn="datacolumn" class="combo_essential" value="01" text="직원" onitemchanged="grp_search_cmb_gubun_onitemchanged" anchor="default">
  27. <Dataset id="innerdataset">
  28. <ColumnInfo>
  29. <Column id="codecolumn" size="256"/>
  30. <Column id="datacolumn" size="256"/>
  31. </ColumnInfo>
  32. <Rows>
  33. <Row>
  34. <Col id="codecolumn">01</Col>
  35. <Col id="datacolumn">직원</Col>
  36. </Row>
  37. <Row>
  38. <Col id="codecolumn">02</Col>
  39. <Col id="datacolumn">수술실</Col>
  40. </Row>
  41. <Row>
  42. <Col id="codecolumn">03</Col>
  43. <Col id="datacolumn">중식 식권사용현황</Col>
  44. </Row>
  45. <Row>
  46. <Col id="codecolumn">04</Col>
  47. <Col id="datacolumn">식권판매현황</Col>
  48. </Row>
  49. <Row>
  50. <Col id="codecolumn">05</Col>
  51. <Col id="datacolumn">비정규직식권잔량</Col>
  52. </Row>
  53. <Row>
  54. <Col id="codecolumn">06</Col>
  55. <Col id="datacolumn">새마을금고 식수현황</Col>
  56. </Row>
  57. </Rows>
  58. </Dataset>
  59. </Combo>
  60. </Layout>
  61. </Layouts>
  62. </Div>
  63. <Div id="div_prt" taborder="35" position="absolute 1 120 1023 734" anchor="all" scrollbars="none"/>
  64. <Static id="cap_messege2" position="absolute 310 25 713 48" anchor="left top" style="background:yellow;border:1 solid #808080ff ;padding:0 0 0 4;align:center middle;font:Dotum,12,bold;"/>
  65. </Layout>
  66. </Layouts>
  67. <Bind>
  68. <BindItem id="item19" compid="cap_messege" propid="text" datasetid="ds_messege" columnid="cmt"/>
  69. <BindItem id="item15" compid="grp_search.ipt_fromdd" propid="value" datasetid="ds_send" columnid="fromdd"/>
  70. <BindItem id="item20" compid="grp_search.ipt_todd" propid="value" datasetid="ds_send" columnid="todd"/>
  71. <BindItem id="item0" compid="grp_search.cmb_gubun" propid="value" datasetid="ds_send" columnid="gubun"/>
  72. </Bind>
  73. <Objects>
  74. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  75. <ColumnInfo>
  76. <Column id="instcd" type="STRING" size="256"/>
  77. <Column id="fromdd" type="STRING" size="256"/>
  78. <Column id="todd" type="STRING" size="256"/>
  79. <Column id="gubun" type="STRING" size="256"/>
  80. </ColumnInfo>
  81. <Rows>
  82. <Row>
  83. <Col id="instcd"/>
  84. <Col id="fromdd"/>
  85. <Col id="todd"/>
  86. <Col id="gubun"/>
  87. </Row>
  88. </Rows>
  89. </Dataset>
  90. <Dataset id="ds_main_printlist" firefirstcount="0" firenextcount="0" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  91. </Objects>
  92. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  93. * System Name :
  94. * Job Name :
  95. * Creator :
  96. * Make Date : 2017-12-04
  97. * Description :
  98. *---------------------------------------------------------------------------------------
  99. * Modify Date Modifier Modify Description
  100. *---------------------------------------------------------------------------------------
  101. * 2017-06-19 Live Converter TF->XP
  102. *
  103. *---------------------------------------------------------------------------------------
  104. ****************************************************************************************/
  105. //=======================================================================================
  106. // Lib Include
  107. //---------------------------------------------------------------------------------------
  108. include "com_commonxp::comm_main.xjs";
  109. include "mis_miscommonxp::MIS.xjs";
  110. //=======================================================================================
  111. // Global Form Variable
  112. //---------------------------------------------------------------------------------------
  113. var arErrorCode = new HashArray();
  114. //=======================================================================================
  115. // Function
  116. //---------------------------------------------------------------------------------------
  117. /****************************************************************************************
  118. * Argument : N/A
  119. * Description : 초기화
  120. ****************************************************************************************/
  121. function lf_init() {
  122. var sInstcd = sysf_getUserInfo("dutplceinstcd");
  123. var sScrid = frmf_getMenuParam();
  124. ds_send.setColumn(0, "instcd", sInstcd);
  125. ds_send.setColumn(0, "fromdd", utlf_getCurrentDate());
  126. ds_send.setColumn(0, "todd", utlf_getCurrentDate());
  127. ds_send.setColumn(0, "gubun", "01");
  128. cap_messege_title.style.background = "lightblue";
  129. cap_messege.text = "";
  130. }
  131. /****************************************************************************************
  132. * Argument : N/A
  133. * Description : 시간설정
  134. ****************************************************************************************/
  135. function lf_setTime() {
  136. var cTime = utlf_getCurrentDateTime();
  137. cap_time.text = cTime.substr(0,4)+"/"+cTime.substr(4,2)+"/"+cTime.substr(6,2)+" "+cTime.substr(9,2)+":"+cTime.substr(11,2)+":"+cTime.substr(13,2);
  138. }
  139. /****************************************************************************************
  140. * Argument : N/A
  141. * Description : 조회함수
  142. ****************************************************************************************/
  143. function lf_userAuth() {
  144. if(sysf_getUserInfo("userid").substr(0,4).toUpperCase() == "EVER") {
  145. btn_print.enable = false;
  146. grp_search.enable = false;
  147. }
  148. }
  149. //=======================================================================================
  150. // Event
  151. //---------------------------------------------------------------------------------------
  152. /****************************************************************************************
  153. * Components : Form
  154. * Description : 화면 처음 초기화시 폼초기화
  155. ****************************************************************************************/
  156. function SMRNB00800_onload(obj:Form, e:LoadEventInfo)
  157. {
  158. frmf_initForm(obj);
  159. lf_init();
  160. lf_userAuth();
  161. lf_setTime();
  162. this.setTimer(0, 1000);
  163. }
  164. /****************************************************************************************
  165. * Components : Form
  166. * Description : 화면 타이머 설정 시계표시
  167. ****************************************************************************************/
  168. function SMRNB00800_ontimer(obj:Form, e:TimerEventInfo)
  169. {
  170. if(e.timerid == 0) {
  171. lf_setTime();
  172. }
  173. }
  174. /****************************************************************************************
  175. * Components : Button
  176. * Description : 종료
  177. ****************************************************************************************/
  178. function btn_close_onclick(obj:Button, e:ClickEventInfo)
  179. {
  180. this.close();
  181. }
  182. /****************************************************************************************
  183. * Components : Button
  184. * Description : 조회
  185. ****************************************************************************************/
  186. function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
  187. {
  188. cap_messege2.text = "";
  189. var oParam = {};
  190. oParam.id = "TRRNB00011";
  191. oParam.service = "sicksuapp.SicksuMngt";
  192. oParam.method = "reqGetFoodPrint";
  193. oParam.inds = "req=ds_send";
  194. oParam.outds = "ds_main_printlist=foodprintlist";
  195. oParam.async = false;
  196. oParam.callback = "cf_TRRNB00011";
  197. tranf_submit(oParam);
  198. if(arErrorCode.pop("TRRNB00011") > -1) {
  199. cap_messege_title.style.background = "lightblue";
  200. cap_messege.text = "조회되었습니다.";
  201. var objDOM = rptf_createDOM(); // DOM 객체 설정
  202. rptf_setNodeListToDOM(objDOM, "/root/main/printlist" , ds_main_printlist);
  203. var objParam = new Object();
  204. objParam.xml_data_XML1 = objDOM.documentElement.source;
  205. objParam.tomonth = ds_send.getColumn(0,"todd").substr(4,2);
  206. objParam.fromdd = ds_send.getColumn(0,"fromdd");
  207. objParam.todd = ds_send.getColumn(0,"todd");
  208. var sRexId = "RPRNB008" + ds_send.getColumn(0,"gubun");
  209. var option = "open=1;save=1;directprint=0;printdialog=0;print=1;zoom=1;";
  210. rptf_exeReportPreview30([sRexId],[objParam], option, "", "div_prt");
  211. if( ds_main_printlist.rowcount < 1 ){
  212. cap_messege2.text = "***** 마감된 데이터가 없습니다. *****";
  213. }
  214. } else {
  215. cap_messege_title.style.background = "red";
  216. cap_messege.text = "조회를 실패하였습니다.";
  217. }
  218. }
  219. function cf_TRRNB00011(sSvcId, nErrorCode, sErrorMsg) {
  220. arErrorCode.push(sSvcId, nErrorCode);
  221. }
  222. /****************************************************************************************
  223. * Components : Button
  224. * Description : 출력
  225. ****************************************************************************************/
  226. function btn_print_onclick(obj:Button, e:ClickEventInfo)
  227. {
  228. // var objDOM = rptf_createDOM(); // DOM 객체 설정
  229. // rptf_setNodeListToDOM(objDOM, "/root/main/statlist" , ds_main_statlist);
  230. // var objParam = new Object();
  231. // objParam.xml_data_XML1 = objDOM.documentElement.source;
  232. // objParam.searchdd = ds_send.getColumn(0,"searchdd");
  233. //
  234. // var option = "open=1;save=1;directprint=1;printdialog=1;print=1;zoom=1;callback=lf_complete";
  235. // rptf_exeReportPreview30([gRexId],[objParam], option);
  236. }
  237. function grp_search_cmb_gubun_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  238. {
  239. cap_messege_title.style.background = "lightblue";
  240. cap_messege.text = "";
  241. if(e.postvalue == "01" || e.postvalue == "02" || e.postvalue == "03") {
  242. ds_send.setColumn(0, "fromdd", utlf_getCurrentDate());
  243. ds_send.setColumn(0, "todd", utlf_getCurrentDate());
  244. grp_search.cap_searchdd.visible = true;
  245. grp_search.ipt_fromdd.visible = true;
  246. grp_search.ipt_todd.visible = true;
  247. grp_search.cap_01.visible = true;
  248. } else if(e.postvalue == "04") {
  249. ds_send.setColumn(0, "fromdd", utlf_getCurrentDate());
  250. grp_search.cap_searchdd.visible = true;
  251. grp_search.ipt_fromdd.visible = true;
  252. grp_search.ipt_todd.visible = false;
  253. grp_search.cap_01.visible = false;
  254. } else if(e.postvalue == "05") {
  255. grp_search.cap_searchdd.visible = false;
  256. grp_search.ipt_fromdd.visible = false;
  257. grp_search.ipt_todd.visible = false;
  258. grp_search.cap_01.visible = false;
  259. } else if(e.postvalue == "06") {
  260. ds_send.setColumn(0, "fromdd", utlf_getCurrentDate().substr(0,6)+"01");
  261. ds_send.setColumn(0, "todd", utlf_getCurrentDate());
  262. grp_search.cap_searchdd.visible = true;
  263. grp_search.ipt_fromdd.visible = true;
  264. grp_search.ipt_todd.visible = true;
  265. grp_search.cap_01.visible = true;
  266. }
  267. }
  268. ]]></Script>
  269. </Form>
  270. </FDL>