SMRNB00700_식당이용현황.xfdl 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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 800 600" titletext="식당이용현황" onload="SMRNB00700_onload" ontimer="SMRNB00700_ontimer">
  5. <Layouts>
  6. <Layout>
  7. <Static id="cap_title" class="tit_1" position="absolute 0 0 180 25" text="식당이용현황"/>
  8. <Static id="cap_time" position="absolute 534 1 799 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 617 26 673 48" anchor="top right" onclick="btn_print_onclick"/>
  10. <Button id="btn_close" taborder="30" text="종료" class="btn4" position="absolute 743 26 799 48" anchor="top right" onclick="btn_close_onclick"/>
  11. <Static id="cap_messege_title" position="absolute 4 573 121 596" anchor="left bottom" style="background:lightblue;padding:0 0 0 4;"/>
  12. <Static id="cap_messege" position="absolute 123 573 796 596" 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 799 53" anchor="left top right"/>
  14. <Grid id="grd_statlist" position="absolute 0 120 799 569" binddataset="ds_main_statlist" anchor="all" autofittype="col">
  15. <Formats>
  16. <Format id="default">
  17. <Columns>
  18. <Column size="25" band="left"/>
  19. <Column size="80"/>
  20. <Column size="40"/>
  21. <Column size="120"/>
  22. <Column size="80"/>
  23. <Column size="80"/>
  24. <Column size="159"/>
  25. <Column size="100"/>
  26. <Column size="120"/>
  27. <Column size="60"/>
  28. </Columns>
  29. <Rows>
  30. <Row size="24" band="head"/>
  31. <Row size="24"/>
  32. <Row size="24" band="summ"/>
  33. </Rows>
  34. <Band id="head">
  35. <Cell/>
  36. <Cell col="1" displaytype="normal" text="구분"/>
  37. <Cell col="2" text="시간"/>
  38. <Cell col="3" text="식사시간"/>
  39. <Cell col="4" text="식사장소"/>
  40. <Cell col="5" text="직원ID"/>
  41. <Cell col="6" text="소속"/>
  42. <Cell col="7" text="직급"/>
  43. <Cell col="8" text="이름"/>
  44. <Cell col="9" text="인원수"/>
  45. </Band>
  46. <Band id="body">
  47. <Cell celltype="head" text="expr:currow+1"/>
  48. <Cell col="1" displaytype="combo" style="padding:0 0 0 10;" text="bind:gubun" editautoselect="true" combodataset="ds_cmb_gubun" combocodecol="value" combodatacol="label"/>
  49. <Cell col="2" text="bind:tt"/>
  50. <Cell col="3" displaytype="date" text="bind:food_datetime" mask="yyyy-MM-dd HH:mm:ss"/>
  51. <Cell col="4" displaytype="combo" style="align:center;" text="bind:ocs_id" combodataset="ds_init_placelist" combocodecol="cdid" combodatacol="cdnm"/>
  52. <Cell col="5" displaytype="text" text="bind:id"/>
  53. <Cell col="6" displaytype="text" text="bind:departname" editautoselect="true"/>
  54. <Cell col="7" displaytype="text" text="bind:grade"/>
  55. <Cell col="8" displaytype="text" text="bind:name"/>
  56. <Cell col="9" displaytype="number" text="bind:cnt"/>
  57. </Band>
  58. <Band id="summary">
  59. <Cell/>
  60. <Cell col="1" style="font:Dotum,9,bold;" text="총건수"/>
  61. <Cell col="2" displaytype="number" style="font:Dotum,9,bold;"/>
  62. <Cell col="3" displaytype="number" style="font:Dotum,9,bold;"/>
  63. <Cell col="4"/>
  64. <Cell col="5" displaytype="number" style="font:Dotum,9,bold;"/>
  65. <Cell col="6" displaytype="number" style="font:Dotum,9,bold;" text="expr:rowcount"/>
  66. <Cell col="7" style="font:Dotum,9,bold;" text="합계"/>
  67. <Cell col="8" style="font:Dotum,9,bold;"/>
  68. <Cell col="9" displaytype="number" style="font:Dotum,9,bold;" text="expr:getSum('cnt')"/>
  69. </Band>
  70. </Format>
  71. </Formats>
  72. </Grid>
  73. <Static id="caption1" text="조회리스트" class="tit_2" position="absolute 0 99 101 115"/>
  74. <Shape id="line1" class="line_10" position="absolute 0 115 799 121" anchor="left top right"/>
  75. <Button id="btn_saveExcel" taborder="33" text="Excel" class="btn7" position="absolute 676 26 740 48" anchor="top right" onclick="btn_saveExcel_onclick"/>
  76. <Div id="grp_search" taborder="34" class="div_SA2" position="absolute 0 51 799 91" anchor="left top right">
  77. <Layouts>
  78. <Layout>
  79. <Static id="cap_searchdd" text="조회일자" class="search_name" position="absolute 10 12 84 29" anchor="default"/>
  80. <Button id="btn_search" taborder="4" text="조회" onclick="grp_search_btn_search_onclick" class="btn1" position="absolute 729 9 785 31" style="align:center;" anchor="top right"/>
  81. <Shape id="line7" linetype="vertical" class="line_4" position="absolute 714 7 717 34" anchor="top right"/>
  82. <Calendar id="ipt_searchdd" taborder="5" autoselect="true" class="input_essential" position="absolute 91 9 209 30" anchor="default"/>
  83. <Combo id="cmb_instcd_search" taborder="6" innerdataset="ds_init_placelist_search" codecolumn="cdid" datacolumn="cdnm" position="absolute 327 9 475 29"/>
  84. <Static id="cap_instcd_search" text="식사장소" class="search_name" position="absolute 250 12 324 29"/>
  85. </Layout>
  86. </Layouts>
  87. </Div>
  88. </Layout>
  89. </Layouts>
  90. <Bind>
  91. <BindItem id="item19" compid="cap_messege" propid="text" datasetid="ds_messege" columnid="cmt"/>
  92. <BindItem id="item15" compid="grp_search.ipt_searchdd" propid="value" datasetid="ds_send" columnid="searchdd"/>
  93. <BindItem id="item0" compid="grp_search.cmb_instcd_search" propid="value" datasetid="ds_send" columnid="ocs_id"/>
  94. </Bind>
  95. <Objects>
  96. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  97. <ColumnInfo>
  98. <Column id="instcd" type="STRING" size="256"/>
  99. <Column id="searchdd" type="STRING" size="256"/>
  100. <Column id="scrid" type="STRING" size="256"/>
  101. <Column id="ocs_id" type="STRING" size="256"/>
  102. </ColumnInfo>
  103. <Rows>
  104. <Row>
  105. <Col id="instcd"/>
  106. <Col id="searchdd"/>
  107. <Col id="scrid"/>
  108. <Col id="ocs_id"/>
  109. </Row>
  110. </Rows>
  111. </Dataset>
  112. <Dataset id="ds_main_statlist" firefirstcount="0" firenextcount="0" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  113. <Dataset id="ds_cmb_gubun" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  114. <ColumnInfo>
  115. <Column id="value" type="STRING" size="256"/>
  116. <Column id="label" type="STRING" size="256"/>
  117. </ColumnInfo>
  118. <Rows>
  119. <Row>
  120. <Col id="value">1</Col>
  121. <Col id="label">아침</Col>
  122. </Row>
  123. <Row>
  124. <Col id="value">2</Col>
  125. <Col id="label">점심</Col>
  126. </Row>
  127. <Row>
  128. <Col id="value">3</Col>
  129. <Col id="label">저녁</Col>
  130. </Row>
  131. </Rows>
  132. </Dataset>
  133. <Dataset id="ds_init_placelist_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  134. <ColumnInfo>
  135. <Column id="cdid" type="STRING" size="255"/>
  136. <Column id="cdnm" type="STRING" size="255"/>
  137. </ColumnInfo>
  138. </Dataset>
  139. <Dataset id="ds_init_placelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  140. <ColumnInfo>
  141. <Column id="cdid" type="STRING" size="255"/>
  142. <Column id="cdnm" type="STRING" size="255"/>
  143. </ColumnInfo>
  144. </Dataset>
  145. </Objects>
  146. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  147. * System Name :
  148. * Job Name :
  149. * Creator :
  150. * Make Date : 2017-12-04
  151. * Description :
  152. *---------------------------------------------------------------------------------------
  153. * Modify Date Modifier Modify Description
  154. *---------------------------------------------------------------------------------------
  155. * 2017-06-19 Live Converter TF->XP
  156. *
  157. *---------------------------------------------------------------------------------------
  158. ****************************************************************************************/
  159. //=======================================================================================
  160. // Lib Include
  161. //---------------------------------------------------------------------------------------
  162. include "com_commonxp::comm_main.xjs";
  163. include "mis_miscommonxp::MIS.xjs";
  164. //=======================================================================================
  165. // Global Form Variable
  166. //---------------------------------------------------------------------------------------
  167. var arErrorCode = new HashArray();
  168. //=======================================================================================
  169. // Function
  170. //---------------------------------------------------------------------------------------
  171. /****************************************************************************************
  172. * Argument : N/A
  173. * Description : 초기화
  174. ****************************************************************************************/
  175. function lf_init() {
  176. var sInstcd = sysf_getUserInfo("dutplceinstcd");
  177. var sScrid = frmf_getMenuParam();
  178. ds_send.setColumn(0, "instcd", sInstcd);
  179. ds_send.setColumn(0, "searchdd", utlf_getCurrentDate());
  180. ds_send.setColumn(0, "scrid", sScrid);
  181. if(sScrid == "01") {
  182. this.titletext = "일별직원식당이용현황";
  183. cap_title.text = "일별직원식당이용현황";
  184. misfColHidden(grd_statlist, "tt,food_datetime,id,name", true);
  185. } else if(sScrid == "02") {
  186. grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","tt"), "text", "expr:rowcount");
  187. grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","departname"), "text", "");
  188. this.titletext = "시간별직원이용현황";
  189. cap_title.text = "시간별직원이용현황";
  190. misfColHidden(grd_statlist, "food_datetime,id,name", true);
  191. } else if(sScrid == "03") {
  192. this.titletext = "직원식당이용자리스트";
  193. cap_title.text = "직원식당이용자리스트";
  194. grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","food_datetime"), "text", "expr:rowcount");
  195. grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","departname"), "text", "");
  196. grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","grade"), "text", "");
  197. grd_statlist.setCellProperty("Summ", grd_statlist.getBindCellIndex("body","cnt"), "text", "");
  198. misfColHidden(grd_statlist, "tt,cnt", true);
  199. }
  200. ds_main_statlist.clearData();
  201. cap_messege_title.style.background = "lightblue";
  202. cap_messege.text = "";
  203. }
  204. /****************************************************************************************
  205. * Argument : N/A
  206. * Description : 시간설정
  207. ****************************************************************************************/
  208. function lf_setTime() {
  209. var cTime = utlf_getCurrentDateTime();
  210. 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);
  211. }
  212. function lf_complete() {
  213. cap_messege_title.style.background = "lightblue";
  214. cap_messege.text = "출력이 완료되었습니다.";
  215. }
  216. /****************************************************************************************
  217. * Argument : N/A
  218. * Description : 조회함수
  219. ****************************************************************************************/
  220. function lf_userAuth() {
  221. if(sysf_getUserInfo("userid").substr(0,4).toUpperCase() == "EVER") {
  222. btn_print.enable = false;
  223. btn_saveExcel.enable = false;
  224. grp_search.enable = false;
  225. }
  226. }
  227. //=======================================================================================
  228. // Event
  229. //---------------------------------------------------------------------------------------
  230. /****************************************************************************************
  231. * Components : Form
  232. * Description : 화면 처음 초기화시 폼초기화
  233. ****************************************************************************************/
  234. function SMRNB00700_onload(obj:Form, e:LoadEventInfo)
  235. {
  236. frmf_initForm(obj);
  237. grdf_setGridSort(grd_statlist);
  238. dsf_createDsRow("ds_req", [
  239. {col:"lrgcd", type:"STRING", size:256, val:"ES"}
  240. ]);
  241. var oParam = {};
  242. oParam.id = "TRRNB00015";
  243. oParam.service = "sicksuapp.SicksuMngt";
  244. oParam.method = "reqGetPlaceList";
  245. oParam.inds = "req=ds_req";
  246. oParam.outds = "ds_init_placelist=placelist";
  247. oParam.async = false;
  248. //oParam.callback = "cf_TRRNB00015";
  249. tranf_submit(oParam);
  250. ds_init_placelist_search.copyData(ds_init_placelist);
  251. frmf_addComboItem( "grp_search.cmb_instcd_search", "전체", "");
  252. lf_init();
  253. lf_userAuth();
  254. lf_setTime();
  255. this.setTimer(0, 1000);
  256. }
  257. /****************************************************************************************
  258. * Components : Form
  259. * Description : 화면 타이머 설정 시계표시
  260. ****************************************************************************************/
  261. function SMRNB00700_ontimer(obj:Form, e:TimerEventInfo)
  262. {
  263. if(e.timerid == 0) {
  264. lf_setTime();
  265. }
  266. }
  267. /****************************************************************************************
  268. * Components : Button
  269. * Description : 종료
  270. ****************************************************************************************/
  271. function btn_close_onclick(obj:Button, e:ClickEventInfo)
  272. {
  273. this.close();
  274. }
  275. /****************************************************************************************
  276. * Components : Button
  277. * Description : 조회
  278. ****************************************************************************************/
  279. function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
  280. {
  281. var oParam = {};
  282. oParam.id = "TRRNB00010";
  283. oParam.service = "sicksuapp.SicksuMngt";
  284. oParam.method = "reqGetFoodStatList";
  285. oParam.inds = "req=ds_send";
  286. oParam.outds = "ds_main_statlist=foodstatlist";
  287. oParam.async = false;
  288. oParam.callback = "cf_TRRNB00010";
  289. tranf_submit(oParam);
  290. if(arErrorCode.pop("TRRNB00010") > -1) {
  291. //dsf_setTypeFormat(ds_main_statlist, "cnt:INT");
  292. cap_messege_title.style.background = "lightblue";
  293. cap_messege.text = "조회되었습니다.";
  294. }
  295. }
  296. function cf_TRRNB00010(sSvcId, nErrorCode, sErrorMsg) {
  297. arErrorCode.push(sSvcId, nErrorCode);
  298. }
  299. /****************************************************************************************
  300. * Components : Button
  301. * Description : 엑셀저장
  302. ****************************************************************************************/
  303. function btn_saveExcel_onclick(obj:Button, e:ClickEventInfo)
  304. {
  305. if( ds_main_statlist.rowcount > 0 ){
  306. grdf_exportExcel(grd_statlist, "일별직원식당현황", "SheetName", false, "", "user", false);
  307. } else {
  308. sysf_messageBox("조회된 데이터가 ", "I004");
  309. }
  310. }
  311. /****************************************************************************************
  312. * Components : Button
  313. * Description : 출력
  314. ****************************************************************************************/
  315. function btn_print_onclick(obj:Button, e:ClickEventInfo)
  316. {
  317. var objDOM = rptf_createDOM(); // DOM 객체 설정
  318. rptf_setNodeListToDOM(objDOM, "/root/main/statlist" , ds_main_statlist);
  319. var objParam = new Object();
  320. objParam.xml_data_XML1 = objDOM.documentElement.source;
  321. objParam.searchdd = ds_send.getColumn(0,"searchdd");
  322. var option = "open=1;save=1;directprint=0;printdialog=1;print=1;zoom=1;callback=lf_complete";
  323. var sScrid = frmf_getMenuParam();
  324. var sRexid = "RPRNB007" + sScrid;
  325. rptf_exeReportPreview30([sRexid],[objParam], option);
  326. }
  327. ]]></Script>
  328. </Form>
  329. </FDL>