SMMNG02401_세탁청구현황(칠곡병원).xfdl 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMNG02401" position="absolute 0 0 1178 709" titletext="청구현황" oninit="SMMNG02401_oninit" onload="SMMNG02401_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 60 1178 709" id="grp_biz" scrollbars="autoboth" anchor="all">
  8. <Layouts>
  9. <Layout>
  10. <Static text="린넨수급현황" position="absolute 0 6 121 22" id="caption12" class="tit_2" anchor="default"/>
  11. <Shape position="absolute 0 23 1178 29" linetype="horizontal" id="line1" class="line_10" anchor="left top right"/>
  12. <Grid position="absolute 0 28 1178 649" id="grd_lnrqactinfo" binddataset="ds_main_lnrqact_lnrqactinfo" tabstop="false" selecttype="multirow" anchor="all" cellsizingtype="col">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="130"/>
  17. <Column size="130"/>
  18. <Column size="130"/>
  19. </Columns>
  20. <Rows>
  21. <Row size="24" band="head"/>
  22. <Row size="24"/>
  23. </Rows>
  24. <Band id="head">
  25. <Cell/>
  26. <Cell col="1"/>
  27. <Cell col="2"/>
  28. </Band>
  29. <Band id="body">
  30. <Cell style="align:left middle;" text="bind:lngoodnm"/>
  31. <Cell col="1" style="align:left middle;" text="bind:goodcd"/>
  32. <Cell col="2" style="align:left top;padding:5 2 1 2;" text="bind:goodcdseq" wordwrap="word"/>
  33. </Band>
  34. </Format>
  35. </Formats>
  36. </Grid>
  37. </Layout>
  38. </Layouts>
  39. </Div>
  40. <Div id="group1" anchor="left top right" taborder="3" class="div_SA" position="absolute 0 24 1178 60">
  41. <Layouts>
  42. <Layout/>
  43. </Layouts>
  44. </Div>
  45. <Static id="cap_instcd" text="기관코드 :" class="search_name" position="absolute 5 33 91 53"/>
  46. <Edit id="opt_instcdnm" taborder="4" readonly="true" class="output" position="absolute 95 33 270 53" style="align:center middle;" align="align:center middle;"/>
  47. <Static id="cap_csrreqdeptcd" text="년월:" class="search_name" position="absolute 289 33 330 53"/>
  48. <Calendar id="ipt_reqfromdd" taborder="5" class="input_default" position="absolute 334 33 419 53" mask="yyyy-mm-dd"/>
  49. <Static id="caption2" text="~" position="absolute 430 33 445 53"/>
  50. <Calendar id="ipt_reqtodd" taborder="6" class="input_default" position="absolute 444 33 529 53" mask="yyyy-mm-dd"/>
  51. <Static id="caption1" text="청구부서:" class="search_name" position="absolute 557 33 642 53"/>
  52. <Combo id="cmb_deptcd" taborder="7" innerdataset="@ds_init_csrreqdeptlist" codecolumn="deptcd" datacolumn="deptnm" onitemchanged="cmb_deptcd_onitemchanged" class="combo_essential" position="absolute 629 33 775 53"/>
  53. <Shape id="line2" linetype="vertical" class="line_4" position="absolute 1047 31 1053 55" anchor="top right"/>
  54. <Button id="btn_search" taborder="8" text="조회" onclick="btn_search_onclick" class="btn1" position="absolute 1055 32 1111 53" anchor="top right"/>
  55. <Button id="button3" taborder="9" text="엑셀" onclick="button3_onclick" class="btn7" position="absolute 1115 32 1171 53" anchor="top right"/>
  56. <Static id="caption6" text="린넨수급현황" class="tit_1" position="absolute 0 0 109 25"/>
  57. </Layout>
  58. </Layouts>
  59. <Objects>
  60. <Dataset id="ds_main_lnrqact" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  61. <ColumnInfo>
  62. <Column id="lnrqdept" type="STRING" size="256"/>
  63. </ColumnInfo>
  64. <Rows>
  65. <Row/>
  66. </Rows>
  67. </Dataset>
  68. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  69. <ColumnInfo>
  70. <Column id="reqfromdd" type="STRING" size="256"/>
  71. <Column id="instcdnm" type="STRING" size="256"/>
  72. <Column id="instcd" type="STRING" size="256"/>
  73. <Column id="reqtodd" type="STRING" size="256"/>
  74. <Column id="deptcd" type="STRING" size="256"/>
  75. </ColumnInfo>
  76. <Rows>
  77. <Row>
  78. <Col id="reqfromdd"/>
  79. <Col id="instcdnm"/>
  80. <Col id="instcd"/>
  81. <Col id="reqtodd"/>
  82. <Col id="deptcd"/>
  83. </Row>
  84. </Rows>
  85. </Dataset>
  86. <Dataset id="ds_init_csrreqdeptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  87. <ColumnInfo>
  88. <Column id="deptcd" type="STRING" size="256"/>
  89. <Column id="deptnm" type="STRING" size="256"/>
  90. </ColumnInfo>
  91. </Dataset>
  92. <Dataset id="ds_temp_lnrqact_lnrqactinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  93. <Dataset id="ds_main_lnrqact_lnrqactinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  94. <Dataset id="ds_temp_lnrqact_lnrqdept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  95. <Dataset id="ds_temp_lnrqact_lnrqmaxrow" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  96. </Objects>
  97. <Bind>
  98. <BindItem id="item1" compid="opt_instcdnm" propid="value" datasetid="ds_send" columnid="instcdnm"/>
  99. <BindItem id="item0" compid="ipt_reqfromdd" propid="value" datasetid="ds_send" columnid="reqfromdd"/>
  100. <BindItem id="item3" compid="ipt_reqtodd" propid="value" datasetid="ds_send" columnid="reqtodd"/>
  101. <BindItem id="item2" compid="cmb_deptcd" propid="value" datasetid="ds_send" columnid="deptcd"/>
  102. </Bind>
  103. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  104. * System Name :
  105. * Job Name :
  106. * Creator :
  107. * Make Date : 2017-07-11
  108. * Description :
  109. *---------------------------------------------------------------------------------------
  110. * Modify Date Modifier Modify Description
  111. *---------------------------------------------------------------------------------------
  112. * 2017-07-11 Live Converter TF->XP
  113. *
  114. *---------------------------------------------------------------------------------------
  115. ****************************************************************************************/
  116. include "com_commonxp::comm_main.xjs";
  117. function SMMNG02401_oninit(obj:Form, e:InitEventInfo)
  118. {
  119. frmf_initForm(obj);
  120. }
  121. function SMMNG02401_onload(obj:Form, e:LoadEventInfo)
  122. {
  123. fInitialize();
  124. ds_main_lnrqact_lnrqactinfo.addColumn("lngoodnm", "string");
  125. ds_main_lnrqact_lnrqactinfo.addColumn("goodcd", "string");
  126. ds_main_lnrqact_lnrqactinfo.addColumn("goodcdseq", "string");
  127. }
  128. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  129. function fInitialize()
  130. {
  131. ds_send.setColumn(0, "instcdnm" , sysf_getUserInfo("dutplceinstnm")); //기관코드
  132. ds_send.setColumn(0, "reqfromdd", utlf_getCurrentDate()); //년월일
  133. ds_send.setColumn(0, "reqtodd" , utlf_getCurrentDate()); //년월일
  134. dsf_makeValue(ds_send,"instcd" , "string", sysf_getUserInfo("dutplceinstcd")); //기관코드
  135. // 부서구분 조회
  136. var oParam = {};
  137. oParam.id = "TRMNG00401";
  138. oParam.service = "csrapp.CsrMngt";
  139. oParam.method = "getCsrDeptList";
  140. oParam.inds = "req=ds_send";
  141. oParam.outds = "ds_init_csrreqdeptlist=csrdeptlist";
  142. oParam.async = false;
  143. tranf_submit(oParam);
  144. frmf_addComboItem( "cmb_deptcd", "전체", "", "above");
  145. }
  146. function btn_search_onclick(obj:Button, e:ClickEventInfo)
  147. {
  148. fSearch();
  149. }
  150. function fSearch() {
  151. ds_temp_lnrqact_lnrqactinfo.clearData();
  152. ds_temp_lnrqact_lnrqdept.clearData();
  153. ds_temp_lnrqact_lnrqmaxrow.clearData();
  154. //20180119 이돈희 추가 : 병동 변경시 그리드에 기존에 있는 값에서 추가됨
  155. ds_main_lnrqact_lnrqactinfo.clearData();
  156. var oParam = {};
  157. oParam.id = "TRMNG02403";
  158. oParam.service = "csrapp.CsrDryMngt";
  159. oParam.method = "reqGetLnrqActInfo";
  160. oParam.inds = "req=ds_send";
  161. oParam.outds = "ds_temp_lnrqact_lnrqactinfo=lnrqactinfo ds_temp_lnrqact_lnrqdept=lnrqdept ds_temp_lnrqact_lnrqmaxrow=lnrqmaxrow";
  162. oParam.async = false;
  163. tranf_submit(oParam);
  164. fDataset();
  165. }
  166. //20180122 이돈희 수정 : 청구부서를 전체로 조회시 total만 나오도록 수정
  167. // : 안전재고량과 실재고량 삭제
  168. function fDataset() {
  169. var caption = "린넨품명^물품코드^상세코드";
  170. var caption1 = "린넨품명^물품코드^상세코드";
  171. var sColumnInfo = "";
  172. var sRowInfo = "";
  173. var sHeadInfo = "";
  174. var sHeadInfo2 = "";
  175. var sBodyInfo = "";
  176. var sFormatInfo = "";
  177. sColumnInfo += '<Columns size="180" /> \r\n';
  178. sColumnInfo += '<Columns size="150" /> \r\n'
  179. sColumnInfo += '<Columns size="150" /> \r\n'
  180. sRowInfo += '<Row size="24" band="head" /> \r\n';
  181. sRowInfo += '<Row size="24" band="head" /> \r\n';
  182. sRowInfo += '<Row size="24" /> \r\n';
  183. sHeadInfo = '<Cell rowspan="2" text="린넨품명"/> \r\n';
  184. sHeadInfo += '<Cell col="1" rowspan="2" text="물품코드"/> \r\n';
  185. sHeadInfo += '<Cell col="2" rowspan="2" text="상세코드"/> \r\n';
  186. sBodyInfo += '<Cell col="0" text="bind:lngoodnm" style="align:left&#32;top;padding:5&#32;2&#32;1&#32;2;" wordwrap="word"/> \r\n';
  187. sBodyInfo += '<Cell col="1" text="bind:goodcd" style="align:left&#32;center;"/> \r\n';
  188. sBodyInfo += '<Cell col="2" text="bind:goodcdseq" style="align:left&#32;top;padding:5&#32;2&#32;1&#32;2;" wordwrap="word"/> \r\n';
  189. var colnum = 3;
  190. //전체 인 경우
  191. if(utlf_isNull(cmb_deptcd.value)){
  192. // total에 대한 데이터셋 컬럼 추가
  193. ds_main_lnrqact_lnrqactinfo.addColumn("reqsum" , "string");//청구량
  194. ds_main_lnrqact_lnrqactinfo.addColumn("outsum" , "string");//불출량
  195. sColumnInfo += '<Columns size="60" /> \r\n';
  196. sColumnInfo += '<Columns size="60" /> \r\n';
  197. //total에 대한 head format
  198. sHeadInfo += '<Cell colspan="2" col="' + colnum + '" text="TOTAL"/> \r\n';
  199. sHeadInfo2 += '<Cell style="align:center&#32;top;padding:5&#32;2&#32;1&#32;2;" wordwrap="word" row="1" col="' + colnum + '" text="청구량"/> \r\n';
  200. sHeadInfo2 += '<Cell row="1" col="' + (colnum+1) + '" text="불출량"/> \r\n';
  201. //total에 대한 body format
  202. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+colnum+'" displaytype="normal" edittype="none" text="bind:reqsum"/> \r\n';
  203. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+(colnum+1)+'" displaytype="normal" edittype="none" text="bind:outsum"/> \r\n';
  204. sHeadInfo += sHeadInfo2;
  205. sColumnInfo = '<Columns> \r\n' + sColumnInfo + '</Columns> \r\n' ;
  206. sRowInfo = '<Rows> \r\n' + sRowInfo + '</Rows> \r\n';
  207. sHeadInfo = '<Band id="head"> \r\n' + sHeadInfo + '</Band> \r\n';
  208. sBodyInfo = '<Band id="body"> \r\n' + sBodyInfo + '</Band> \r\n';
  209. sFormatInfo = '<Formats> \r\n';
  210. sFormatInfo += '<Format id="default"> \r\n';
  211. sFormatInfo += sColumnInfo + sRowInfo + sHeadInfo + sBodyInfo;
  212. sFormatInfo += '</Format> \r\n';
  213. sFormatInfo += '</Formats>';
  214. grp_biz.grd_lnrqactinfo.enableredraw = false;
  215. grp_biz.grd_lnrqactinfo.formats = sFormatInfo;
  216. grp_biz.grd_lnrqactinfo.enableredraw = true;
  217. var reqcol = 0;
  218. var outcol = 0;
  219. for ( h=0; h< ds_temp_lnrqact_lnrqmaxrow.getColumn(0, "maxrow"); h++) {
  220. ds_main_lnrqact_lnrqactinfo.addRow();
  221. }
  222. //grp_biz.grd_lnrqactinfo.updateToDataset();
  223. for ( k=0; k< ds_temp_lnrqact_lnrqactinfo.rowcount; k++) {
  224. var row = ds_temp_lnrqact_lnrqactinfo.getColumn(k, "rnum")-2;
  225. var col = ds_temp_lnrqact_lnrqactinfo.getColumn(k, "col");
  226. //col 값이 null이면 total에 해당하는 값임
  227. if ( utlf_isNull(col) ) {
  228. reqcol = "reqsum";
  229. outcol = "outsum";
  230. ds_main_lnrqact_lnrqactinfo.setColumn(row, "goodcd" , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "goodcd"));
  231. ds_main_lnrqact_lnrqactinfo.setColumn(row, "goodcdseq" , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "goodcdseq"));
  232. ds_main_lnrqact_lnrqactinfo.setColumn(row, reqcol , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "reqcnt"));
  233. ds_main_lnrqact_lnrqactinfo.setColumn(row, outcol , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "outcnt"));
  234. }
  235. // 린넨 품명 입력
  236. if ( !utlf_isNull(ds_temp_lnrqact_lnrqactinfo.getColumn(k, "lngoodnm")) ) {
  237. ds_main_lnrqact_lnrqactinfo.setColumn(row, "lngoodnm", ds_temp_lnrqact_lnrqactinfo.getColumn(k, "lngoodnm"));
  238. }
  239. }
  240. }
  241. //특정 부서인 경우
  242. else {
  243. // caption 및 컬럼 동적생성
  244. for ( i = 0; i < ds_temp_lnrqact_lnrqdept.rowcount; i++) {
  245. for( jj=1; jj < 3; jj++) {
  246. ds_main_lnrqact_lnrqactinfo.addColumn("col"+ colnum , "string");
  247. sColumnInfo += '<Columns size="60" /> \r\n';
  248. if(jj==1){
  249. sHeadInfo += '<Cell col="' + colnum + '" colspan="2" text="'+ ds_temp_lnrqact_lnrqdept.getColumn(i, "deptnm") +'"/> \r\n';
  250. }
  251. if(jj==1){
  252. sHeadInfo2 += '<Cell style="align:center&#32;top;padding:5&#32;2&#32;1&#32;2;" wordwrap="word" row="1" col="' + colnum + '" text="청구량"/> \r\n';
  253. }
  254. if(jj==2){
  255. sHeadInfo2 += '<Cell row="1" col="' + colnum+ '" text="불출량"/> \r\n';
  256. }
  257. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+colnum+'" displaytype="normal" edittype="none" text="bind:col'+ colnum + '"/> \r\n';
  258. colnum++;
  259. }
  260. }
  261. // total에 대한 데이터셋 컬럼 추가
  262. ds_main_lnrqact_lnrqactinfo.addColumn("reqsum" , "string");//청구량
  263. ds_main_lnrqact_lnrqactinfo.addColumn("outsum" , "string");//불출량
  264. sColumnInfo += '<Columns size="60" /> \r\n';
  265. sColumnInfo += '<Columns size="60" /> \r\n';
  266. //total에 대한 head format
  267. sHeadInfo += '<Cell colspan="2" col="' + colnum + '" text="TOTAL"/> \r\n';
  268. sHeadInfo2 += '<Cell style="align:center&#32;top;padding:5&#32;2&#32;1&#32;2;" wordwrap="word" row="1" col="' + colnum + '" text="청구량"/> \r\n';
  269. sHeadInfo2 += '<Cell row="1" col="' + (colnum+1) + '" text="불출량"/> \r\n';
  270. //total에 대한 body format
  271. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+colnum+'" displaytype="normal" edittype="none" text="bind:reqsum"/> \r\n';
  272. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+(colnum+1)+'" displaytype="normal" edittype="none" text="bind:outsum"/> \r\n';
  273. sHeadInfo += sHeadInfo2;
  274. sColumnInfo = '<Columns> \r\n' + sColumnInfo + '</Columns> \r\n' ;
  275. sRowInfo = '<Rows> \r\n' + sRowInfo + '</Rows> \r\n';
  276. sHeadInfo = '<Band id="head"> \r\n' + sHeadInfo + '</Band> \r\n';
  277. sBodyInfo = '<Band id="body"> \r\n' + sBodyInfo + '</Band> \r\n';
  278. sFormatInfo = '<Formats> \r\n';
  279. sFormatInfo += '<Format id="default"> \r\n';
  280. sFormatInfo += sColumnInfo + sRowInfo + sHeadInfo + sBodyInfo;
  281. sFormatInfo += '</Format> \r\n';
  282. sFormatInfo += '</Formats>';
  283. grp_biz.grd_lnrqactinfo.enableredraw = false;
  284. grp_biz.grd_lnrqactinfo.formats = sFormatInfo;
  285. grp_biz.grd_lnrqactinfo.enableredraw = true;
  286. var reqcol = 0;
  287. var outcol = 0;
  288. for ( h=0; h< ds_temp_lnrqact_lnrqmaxrow.getColumn(0, "maxrow"); h++) {
  289. ds_main_lnrqact_lnrqactinfo.addRow();
  290. }
  291. //grp_biz.grd_lnrqactinfo.updateToDataset();
  292. for ( k=0; k< ds_temp_lnrqact_lnrqactinfo.rowcount; k++) {
  293. var row = ds_temp_lnrqact_lnrqactinfo.getColumn(k, "rnum")-2;
  294. var col = ds_temp_lnrqact_lnrqactinfo.getColumn(k, "col");
  295. //col 값이 null이면 total에 해당하는 값임
  296. if ( utlf_isNull(col) ) {
  297. reqcol = "reqsum";
  298. outcol = "outsum";
  299. } else {
  300. reqcol = (col-1)*2 + 3;
  301. outcol = (col-1)*2 + 4;
  302. reqcol = grp_biz.grd_lnrqactinfo.getCellProperty("Body", reqcol, "text");
  303. reqcol = reqcol.replace("bind:", "");
  304. outcol = grp_biz.grd_lnrqactinfo.getCellProperty("Body", outcol, "text");
  305. outcol = outcol.replace("bind:", "");
  306. }
  307. // 린넨 품명 입력
  308. if ( !utlf_isNull(ds_temp_lnrqact_lnrqactinfo.getColumn(k, "lngoodnm")) ) {
  309. ds_main_lnrqact_lnrqactinfo.setColumn(row, "lngoodnm", ds_temp_lnrqact_lnrqactinfo.getColumn(k, "lngoodnm"));
  310. }
  311. ds_main_lnrqact_lnrqactinfo.setColumn(row, "goodcd" , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "goodcd"));
  312. ds_main_lnrqact_lnrqactinfo.setColumn(row, "goodcdseq" , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "goodcdseq"));
  313. ds_main_lnrqact_lnrqactinfo.setColumn(row, reqcol , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "reqcnt"));
  314. ds_main_lnrqact_lnrqactinfo.setColumn(row, outcol , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "outcnt"));
  315. }
  316. }
  317. }
  318. //부서별 안전재고량/청구량/불출량/실재고량 표시 함수
  319. function fDataset_20180119() {
  320. var caption = "린넨품명^물품코드^상세코드";
  321. var caption1 = "린넨품명^물품코드^상세코드";
  322. var sColumnInfo = "";
  323. var sRowInfo = "";
  324. var sHeadInfo = "";
  325. var sHeadInfo2 = "";
  326. var sBodyInfo = "";
  327. var sFormatInfo = "";
  328. sColumnInfo += '<Columns size="150" /> \r\n';
  329. sColumnInfo += '<Columns size="100" /> \r\n'
  330. sColumnInfo += '<Columns size="100" /> \r\n'
  331. sRowInfo += '<Row size="24" band="head" /> \r\n';
  332. sRowInfo += '<Row size="24" band="head" /> \r\n';
  333. sRowInfo += '<Row size="24" /> \r\n';
  334. sHeadInfo = '<Cell rowspan="2" text="린넨품명"/> \r\n';
  335. sHeadInfo += '<Cell col="1" rowspan="2" text="물품코드"/> \r\n';
  336. sHeadInfo += '<Cell col="2" rowspan="2" text="상세코드"/> \r\n';
  337. sBodyInfo += '<Cell col="0" text="bind:lngoodnm" style="align:left&#32;top;padding:5&#32;2&#32;1&#32;2;" wordwrap="word"/> \r\n';
  338. sBodyInfo += '<Cell col="1" text="bind:goodcd" style="align:left&#32;center;"/> \r\n';
  339. sBodyInfo += '<Cell col="2" text="bind:goodcdseq" style="align:left&#32;top;padding:5&#32;2&#32;1&#32;2;" wordwrap="word"/> \r\n';
  340. var colnum = 3;
  341. // caption 및 컬럼 동적생성
  342. for ( i = 0; i < ds_temp_lnrqact_lnrqdept.rowcount-1; i++) {
  343. for( jj=1; jj < 5; jj++) {
  344. ds_main_lnrqact_lnrqactinfo.addColumn("col"+ colnum , "string");
  345. sColumnInfo += '<Columns size="60" /> \r\n';
  346. if(jj==1){
  347. sHeadInfo += '<Cell col="' + colnum + '" colspan="4" text="'+ ds_temp_lnrqact_lnrqdept.getColumn(i, "deptnm") +'"/> \r\n';
  348. }
  349. if(jj==1){
  350. sHeadInfo2 += '<Cell style="align:center&#32;top;padding:5&#32;2&#32;1&#32;2;" wordwrap="word" row="1" col="' + colnum + '" text="안전재고량"/> \r\n';
  351. }
  352. if(jj==2){
  353. sHeadInfo2 += '<Cell row="1" col="' + colnum+ '" text="청구량"/> \r\n';
  354. }
  355. if(jj==3){
  356. sHeadInfo2 += '<Cell row="1" col="' + colnum + '" text="불출량"/> \r\n';
  357. }
  358. if(jj==4){
  359. sHeadInfo2 += '<Cell row="1" col="' + colnum + '" text="실재고량"/> \r\n';
  360. }
  361. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+colnum+'" displaytype="normal" edittype="none" text="bind:col'+ colnum + '"/> \r\n';
  362. colnum++;
  363. }
  364. }
  365. ds_main_lnrqact_lnrqactinfo.addColumn("lnsfsum" , "string");
  366. ds_main_lnrqact_lnrqactinfo.addColumn("reqsum" , "string");
  367. ds_main_lnrqact_lnrqactinfo.addColumn("outsum" , "string");
  368. ds_main_lnrqact_lnrqactinfo.addColumn("lnrlsum" , "string");
  369. sColumnInfo += '<Columns size="60" /> \r\n';
  370. sColumnInfo += '<Columns size="60" /> \r\n';
  371. sColumnInfo += '<Columns size="60" /> \r\n';
  372. sColumnInfo += '<Columns size="60" /> \r\n';
  373. sHeadInfo += '<Cell colspan="4" col="' + colnum + '" text="TOTAL"/> \r\n';
  374. sHeadInfo2 += '<Cell style="align:center&#32;top;padding:5&#32;2&#32;1&#32;2;" wordwrap="word" row="1" col="' + colnum + '" text="안전재고량"/> \r\n';
  375. sHeadInfo2 += '<Cell row="1" col="' + (colnum+1) + '" text="청구량"/> \r\n';
  376. sHeadInfo2 += '<Cell row="1" col="' + (colnum+2) + '" text="불출량"/> \r\n';
  377. sHeadInfo2 += '<Cell row="1" col="' + (colnum+3) + '" text="실재고량"/> \r\n';
  378. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+colnum+'" displaytype="normal" edittype="none" text="bind:lnsfsum"/> \r\n';
  379. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+(colnum+1)+'" displaytype="normal" edittype="none" text="bind:reqsum"/> \r\n';
  380. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+(colnum+2)+'" displaytype="normal" edittype="none" text="bind:outsum"/> \r\n';
  381. sBodyInfo += '<Cell style="align:left&#32;center;" col="'+(colnum+3)+'" displaytype="normal" edittype="none" text="bind:lnrlsum"/> \r\n';
  382. sHeadInfo += sHeadInfo2;
  383. sColumnInfo = '<Columns> \r\n' + sColumnInfo + '</Columns> \r\n' ;
  384. sRowInfo = '<Rows> \r\n' + sRowInfo + '</Rows> \r\n';
  385. sHeadInfo = '<Band id="head"> \r\n' + sHeadInfo + '</Band> \r\n';
  386. sBodyInfo = '<Band id="body"> \r\n' + sBodyInfo + '</Band> \r\n';
  387. sFormatInfo = '<Formats> \r\n';
  388. sFormatInfo += '<Format id="default"> \r\n';
  389. sFormatInfo += sColumnInfo + sRowInfo + sHeadInfo + sBodyInfo;
  390. sFormatInfo += '</Format> \r\n';
  391. sFormatInfo += '</Formats>';
  392. grp_biz.grd_lnrqactinfo.enableredraw = false;
  393. grp_biz.grd_lnrqactinfo.formats = sFormatInfo;
  394. grp_biz.grd_lnrqactinfo.enableredraw = true;
  395. var lnsfcol = 0;
  396. var reqcol = 0;
  397. var outcol = 0;
  398. var lnrlcol = 0;
  399. for ( h=0; h< ds_temp_lnrqact_lnrqmaxrow.getColumn(0, "maxrow"); h++) {
  400. ds_main_lnrqact_lnrqactinfo.addRow();
  401. }
  402. grp_biz.grd_lnrqactinfo.updateToDataset();
  403. for ( k=0; k< ds_temp_lnrqact_lnrqactinfo.rowcount; k++) {
  404. var row = ds_temp_lnrqact_lnrqactinfo.getColumn(k, "rnum")-2;
  405. var col = ds_temp_lnrqact_lnrqactinfo.getColumn(k, "col");
  406. if ( utlf_isNull(col) ) {
  407. lnsfcol = "lnsfsum";
  408. reqcol = "reqsum";
  409. outcol = "outsum";
  410. lnrlcol = "lnrlsum";
  411. } else {
  412. lnsfcol = (col-1)*4 + 3;
  413. reqcol = (col-1)*4 + 4;
  414. outcol = (col-1)*4 + 5;
  415. lnrlcol = (col-1)*4 + 6;
  416. lnsfcol = grp_biz.grd_lnrqactinfo.getCellProperty("Body", lnsfcol, "text");
  417. lnsfcol = lnsfcol.replace("bind:", "");
  418. reqcol = grp_biz.grd_lnrqactinfo.getCellProperty("Body", reqcol, "text");
  419. reqcol = reqcol.replace("bind:", "");
  420. outcol = grp_biz.grd_lnrqactinfo.getCellProperty("Body", outcol, "text");
  421. outcol = outcol.replace("bind:", "");
  422. lnrlcol = grp_biz.grd_lnrqactinfo.getCellProperty("Body", lnrlcol, "text");
  423. lnrlcol = lnrlcol.replace("bind:", "");
  424. }
  425. if ( !utlf_isNull(ds_temp_lnrqact_lnrqactinfo.getColumn(k, "lngoodnm")) ) {
  426. ds_main_lnrqact_lnrqactinfo.setColumn(row, "lngoodnm", ds_temp_lnrqact_lnrqactinfo.getColumn(k, "lngoodnm"));
  427. }
  428. ds_main_lnrqact_lnrqactinfo.setColumn(row, "goodcd" , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "goodcd"));
  429. ds_main_lnrqact_lnrqactinfo.setColumn(row, "goodcdseq" , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "goodcdseq"));
  430. ds_main_lnrqact_lnrqactinfo.setColumn(row, lnsfcol , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "lnsfcnt"));
  431. ds_main_lnrqact_lnrqactinfo.setColumn(row, reqcol , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "reqcnt"));
  432. ds_main_lnrqact_lnrqactinfo.setColumn(row, outcol , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "outcnt"));
  433. ds_main_lnrqact_lnrqactinfo.setColumn(row, lnrlcol , ds_temp_lnrqact_lnrqactinfo.getColumn(k, "lnrlcnt"));
  434. }
  435. }
  436. function button3_onclick(obj:Button, e:ClickEventInfo)
  437. {
  438. grdf_exportExcel(grp_biz.grd_lnrqactinfo, "린넨부서별청구현황", "sheetname1" , true, "" , "" , true);
  439. }
  440. function cmb_deptcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  441. {
  442. fSearch();
  443. }
  444. ]]></Script>
  445. </Form>
  446. </FDL>