SPSTP00900_수익예산조회.xfdl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPSTP00900" position="absolute 0 0 1203 782" titletext="Untitle" onload="SPSTP00900_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="grp" taborder="6" position="absolute 0 24 1200 62" class="div_SA" anchor="left top right">
  8. <Layouts>
  9. <Layout>
  10. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1005 4 1008 34" style="border: solid #ffe4bb #ffe4bb;" anchor="top right"/>
  11. <Static id="caption21" text="조회년월 :" class="search_name" position="absolute 21 11 95 28" anchor="left top"/>
  12. <Button id="btn_search" taborder="2" text="조회" onclick="btn_search_onclick" class="btn1" position="absolute 1015 8 1071 30" anchor="top right"/>
  13. <Button id="button1" taborder="3" text="엑셀" onclick="button1_onclick" class="btn7" position="absolute 1074 8 1130 30" anchor="top right"/>
  14. <Button id="button2" taborder="4" text="출력" onclick="button2_onclick" class="btn6" position="absolute 1133 8 1189 30" anchor="top right"/>
  15. <Button id="button3" taborder="5" text="수익데이터 생성" onclick="button3_onclick" class="btn4" position="absolute 870 8 997 30" anchor="top right"/>
  16. <Calendar id="ipt_srchdd" taborder="6" position="absolute 105 9 195 29" dateformat="yyyy-MM" value="null" editformat="yyyy-MM" autoselect="true" onkeydown="grp_ipt_srchdd_onkeydown" style="align:center middle;" anchor="left top"/>
  17. </Layout>
  18. </Layouts>
  19. </Div>
  20. <Shape id="line1" class="line_10" linetype="horizontal" position="absolute 0 85 1200 89" style="" anchor="left top right"/>
  21. <Grid id="grd_earnbugt" binddataset="ds_grddata_earnbugtList" position="absolute 0 89 1200 779" style="" anchor="all">
  22. <Formats>
  23. <Format id="default">
  24. <Columns>
  25. <Column size="80"/>
  26. <Column size="100"/>
  27. <Column size="140"/>
  28. <Column size="130"/>
  29. <Column size="130"/>
  30. <Column size="120"/>
  31. <Column size="130"/>
  32. <Column size="130"/>
  33. <Column size="120"/>
  34. </Columns>
  35. <Rows>
  36. <Row size="24" band="head"/>
  37. <Row size="24"/>
  38. </Rows>
  39. <Band id="head">
  40. <Cell text="구분"/>
  41. <Cell col="1" text="센터"/>
  42. <Cell col="2" text="과별"/>
  43. <Cell col="3" text="입원목표"/>
  44. <Cell col="4" text="입원실적"/>
  45. <Cell col="5" text="입원달성율(%)"/>
  46. <Cell col="6" text="외래목표"/>
  47. <Cell col="7" text="외래실적"/>
  48. <Cell col="8" text="외래달성율(%)"/>
  49. </Band>
  50. <Band id="body">
  51. <Cell style="align:center middle;background:BIND(bgColor);background2:BIND(bgColor);font:BIND(font);" text="bind:grupgbnm"/>
  52. <Cell col="1" style="align:center middle;background:BIND(bgColor);background2:BIND(bgColor);font:BIND(font);" text="bind:centhngnm"/>
  53. <Cell col="2" style="align:center middle;background:BIND(bgColor);background2:BIND(bgColor);font:BIND(font);" text="bind:depthngnm"/>
  54. <Cell col="3" displaytype="number" style="align:right middle;background:BIND(bgColor);background2:BIND(bgColor);font:BIND(font);" text="bind:inpgoalamt" mask="#,##0"/>
  55. <Cell col="4" displaytype="number" style="align:right middle;background:BIND(bgColor);background2:BIND(bgColor);font:BIND(font);" text="bind:inptotamt" mask="#,##0"/>
  56. <Cell col="5" style="align:right middle;background:BIND(bgColor);background2:BIND(bgColor);font:BIND(font);" text="bind:inpgoalp"/>
  57. <Cell col="6" displaytype="number" style="align:right middle;background:BIND(bgColor);background2:BIND(bgColor);font:BIND(font);" text="bind:outgoalamt" mask="#,##0"/>
  58. <Cell col="7" displaytype="number" style="align:right middle;background:BIND(bgColor);background2:BIND(bgColor);font:BIND(font);" text="bind:outtotamt" mask="#,##0"/>
  59. <Cell col="8" style="align:right middle;background:BIND(bgColor);background2:BIND(bgColor);font:BIND(font);" text="bind:outgoalp"/>
  60. </Band>
  61. </Format>
  62. </Formats>
  63. </Grid>
  64. <Static id="caption60" class="tit_1" position="absolute 0 0 183 24" style="align:left middle;font:Dotum,9, bold;" text="수익예산조회" anchor="left top"/>
  65. <Static id="caption46" class="tit_2" position="absolute 1 68 105 84" style="" text="수익예산조회" anchor="left top"/>
  66. </Layout>
  67. </Layouts>
  68. <Objects>
  69. <Dataset id="ds_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  70. <ColumnInfo>
  71. <Column id="bugtym" type="STRING" size="256"/>
  72. </ColumnInfo>
  73. <Rows>
  74. <Row/>
  75. </Rows>
  76. </Dataset>
  77. <Dataset id="ds_grddata_earnbugtList" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  78. <ColumnInfo>
  79. <Column id="grupgbnm" type="STRING" size="256" sumtext=""/>
  80. <Column id="grupgb" type="STRING" size="256" sumtext=""/>
  81. <Column id="centhngnm" type="STRING" size="256" sumtext=""/>
  82. <Column id="orddeptcd" type="STRING" size="256" sumtext=""/>
  83. <Column id="depthngnm" type="STRING" size="256" sumtext=""/>
  84. <Column id="inpgoalamt" type="STRING" size="256" sumtext=""/>
  85. <Column id="outgoalamt" type="STRING" size="256" sumtext=""/>
  86. <Column id="inptotamt" type="STRING" size="256" sumtext=""/>
  87. <Column id="outtotamt" type="STRING" size="256" sumtext=""/>
  88. <Column id="inpgoalp" type="STRING" size="256" sumtext=""/>
  89. <Column id="outgoalp" type="STRING" size="256" sumtext=""/>
  90. <Column id="dispseq" type="STRING" size="256" sumtext=""/>
  91. </ColumnInfo>
  92. </Dataset>
  93. <Dataset id="ds_reqExeEarnBugtList" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  94. <ColumnInfo>
  95. <Column id="message" type="STRING" size="256" sumtext=""/>
  96. <Column id="result" type="STRING" size="256" sumtext=""/>
  97. </ColumnInfo>
  98. </Dataset>
  99. </Objects>
  100. <Bind>
  101. <BindItem id="item0" compid="grp.ipt_srchdd" propid="value" datasetid="ds_cond" columnid="bugtym"/>
  102. </Bind>
  103. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  104. * System Name :
  105. * Job Name :
  106. * Creator :
  107. * Make Date : 2016-05-24
  108. * Description :
  109. *---------------------------------------------------------------------------------------
  110. * Modify Date Modifier Modify Description
  111. *---------------------------------------------------------------------------------------
  112. * 2016-05-24 Live Converter TF->XP
  113. *
  114. *---------------------------------------------------------------------------------------
  115. ****************************************************************************************/
  116. //=======================================================================================
  117. // Lib Include
  118. //---------------------------------------------------------------------------------------
  119. include 'com_commonxp::comm_main.xjs';
  120. var arErrorCode = new HashArray();
  121. //=======================================================================================
  122. // Local methods
  123. //---------------------------------------------------------------------------------------
  124. /**
  125. * [fInit description]
  126. * @return {[type]} [description]
  127. */
  128. function fInit() {
  129. ds_cond.setColumn(0, "bugtym", utlf_getCurrentDate().substr(0, 6));
  130. }
  131. /**
  132. * [fDispAprvCnclChng description]
  133. * @param {[type]} grdObj [description]
  134. * @return {[type]} [description]
  135. */
  136. function fDispAprvCnclChng(grdObj: Grid) {
  137. var chagValue = "";
  138. for (var i = 1; i < grdObj.rowcount; i++) {
  139. chagValue = utlf_transNullToEmpty(ds_grddata_earnbugtList.getColumn(i, "orddeptcd"));
  140. if (chagValue == "") {
  141. ds_grddata_earnbugtList.setColumn(i, 'bgColor', '#ffff99');
  142. ds_grddata_earnbugtList.setColumn(i, 'font', 'Dotum,9,bold');
  143. }
  144. }
  145. }
  146. /**
  147. * submit 후 호출 될 공통 콜백
  148. * @param {[type]} sSvcId [description]
  149. * @param {[type]} nErrorCode [description]
  150. * @param {[type]} sErrorMsg [description]
  151. * @return {Function} [description]
  152. */
  153. function callback(sSvcId, nErrorCode, sErrorMsg){
  154. arErrorCode.push(sSvcId, nErrorCode);
  155. }
  156. //=======================================================================================
  157. // Events
  158. //---------------------------------------------------------------------------------------
  159. /**
  160. * onload 이벤트 발생 시 호출
  161. * @param {[type]} obj:Form [description]
  162. * @param {[type]} e:LoadEventInfo [description]
  163. */
  164. function SPSTP00900_onload(obj: Form, e: LoadEventInfo) {
  165. frmf_initForm(obj);
  166. fInit();
  167. }
  168. /**
  169. * ipt_srchdd 키보드 입력 이벤트
  170. * @param {[type]} obj: Calendar [description]
  171. * @param {[type]} e: KeyEventInfo [description]
  172. * @return {[type]} [description]
  173. */
  174. function grp_ipt_srchdd_onkeydown(obj: Calendar, e: KeyEventInfo) {
  175. if (e.keycode == 13) {
  176. grp.btn_search.setFocus();
  177. grp.btn_search.click();
  178. }
  179. }
  180. /**
  181. * 수익데이터 생성 버튼 클릭 이벤트
  182. * @param {[type]} obj: Button [description]
  183. * @param {[type]} e: ClickEventInfo [description]
  184. * @return {[type]} [description]
  185. */
  186. function button3_onclick(obj: Button, e: ClickEventInfo) {
  187. if (utlf_transNullToEmpty(ds_cond.getColumn(0, "bugtym")) == "") {
  188. return;
  189. }
  190. var date = ds_cond.getColumn(0, 'bugtym');
  191. if (sysf_messageBox(date + " 수익자료 생성을", "Q004") == "6") {
  192. ds_reqExeEarnBugtList.clearData();
  193. var oParam = {};
  194. oParam.id = "TXSTP00902";
  195. oParam.service = "stspamapp.StsPam";
  196. oParam.method = "reqExeEarnBugtList";
  197. oParam.inds = "req=ds_cond";
  198. oParam.outds = "ds_reqExeEarnBugtList=reqExeEarnBugtList";
  199. oParam.async = false;
  200. oParam.callback = "callback";
  201. tranf_submit(oParam);
  202. if (arErrorCode.pop("TXSTP00902") > -1) {
  203. ds_reqExeEarnBugtList.updateColID('msg', 'message');
  204. if (ds_reqExeEarnBugtList.rowcount > 0) {
  205. sysf_messageBox(ds_reqExeEarnBugtList.getColumn(0, "message"), "I002");
  206. grp.btn_search.click();
  207. }
  208. else {
  209. sysf_messageBox(ds_reqExeEarnBugtList.getColumn(0, "message"), "C001");
  210. }
  211. }
  212. }
  213. }
  214. /**
  215. * 조회 버튼 클릭 이벤트
  216. * @param {[type]} obj: Button [description]
  217. * @param {[type]} e: ClickEventInfo [description]
  218. * @return {[type]} [description]
  219. */
  220. function btn_search_onclick(obj: Button, e: ClickEventInfo) {
  221. if (utlf_transNullToEmpty(ds_cond.getColumn(0, "bugtym")) == "") {
  222. return;
  223. }
  224. var value = String(ds_cond.getColumn(0, 'bugtym'));
  225. if(value.length > 6){
  226. trace('1');
  227. value = value.substr(0, 6);
  228. ds_cond.setColumn(0, 'bugtym', value);
  229. }
  230. ds_grddata_earnbugtList.clearData();
  231. //trace(ds_cond.saveXML());
  232. var oParam = {};
  233. oParam.id = "TRSTP01705";
  234. oParam.service = "stspamapp.StsPam";
  235. oParam.method = "reqGetEarnBugtList";
  236. oParam.inds = "req=ds_cond";
  237. oParam.outds = "ds_grddata_earnbugtList=earnbugtList";
  238. oParam.async = false;
  239. oParam.callback = "callback";
  240. tranf_submit(oParam);
  241. ds_grddata_earnbugtList.addColumn('bgColor', 'string');
  242. ds_grddata_earnbugtList.addColumn('font', 'string');
  243. if (arErrorCode.pop("TRSTP01705") > -1) {
  244. fDispAprvCnclChng(grd_earnbugt);
  245. }
  246. }
  247. /**
  248. * 엑셀 버튼 클릭 이벤트
  249. * @param {[type]} obj: Button [description]
  250. * @param {[type]} e: ClickEventInfo [description]
  251. * @return {[type]} [description]
  252. */
  253. function button1_onclick(obj: Button, e: ClickEventInfo) {
  254. var today = ds_cond.getColumn(0, "bugtym");
  255. grdf_exportExcel(grd_earnbugt, "수익예산_" + today, "Sheet1", true, "", "user", false);
  256. }
  257. /**
  258. * 출력 버튼 클릭 이벤트
  259. * @param {[type]} obj: Button [description]
  260. * @param {[type]} e: ClickEventInfo [description]
  261. * @return {[type]} [description]
  262. */
  263. function button2_onclick(obj: Button, e: ClickEventInfo) {
  264. // DOM 객체 설정
  265. var objDOM = rptf_createDOM();
  266. rptf_setNodeListToDOM(objDOM, "/root/cond", ds_cond);
  267. rptf_setNodeListToDOM(objDOM, "/root/grddata/earnbugtList", ds_grddata_earnbugtList);
  268. var objParam = new Object();
  269. objParam.xml_data_XML1 = objDOM.documentElement.source;
  270. var option = null;
  271. rptf_exeReportPreview30(["RPSTP00904"],[objParam], option)
  272. }
  273. ]]></Script>
  274. </Form>
  275. </FDL>