SMRFC00403_부서별물품보유제출현황.xfdl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRFC00403" position="absolute 0 0 1199 784" titletext="부서별 물품보유현황 제출내역" oninit="SMRFC00403_oninit" onload="SMRFC00403_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="부서별 물품보유현황 제출내역" class="tit_1" position="absolute 0 0 250 25"/>
  8. <Shape id="line16" class="line_2" position="absolute 0 44 1195 50" anchor="left top right"/>
  9. <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1138 23 1194 45" anchor="top right" onclick="btn_save_onclick"/>
  10. <Div id="grp_sea" anchor="left top right" taborder="2" class="div_SA2" position="absolute 0 48 1195 88">
  11. <Layouts>
  12. <Layout>
  13. <Static id="cap_instcd" text="기관코드 :" class="search_name" position="absolute 15 11 101 28"/>
  14. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1107 7 1113 32" anchor="top right"/>
  15. <Static id="cap_deptcd" text="기준년도 :" class="search_name" position="absolute 511 11 601 28"/>
  16. <Button id="btn_search" taborder="3" text="조회" class="btn1" position="absolute 1125 8 1181 30" onclick="grp_sea_btn_search_onclick" anchor="top right"/>
  17. <Combo id="cmb_instcd" taborder="4" class="combo_essential" enable="false" position="absolute 108 10 346 29" onitemchanged="grp_sea_cmb_instcd_onitemchanged"/>
  18. <Edit id="ipt_yyyy" taborder="5" autoselect="true" autoskip="true" class="input_search" position="absolute 605 10 710 29" maxlength="4" style="align:center middle;" onkeydown="grp_sea_ipt_yyyy_onkeydown" onkillfocus="grp_sea_ipt_yyyy_onkillfocus"/>
  19. </Layout>
  20. </Layouts>
  21. </Div>
  22. <Shape id="line2" class="line_10" position="absolute 0 133 1195 139" anchor="left top right"/>
  23. <Static id="caption8" text="부서별 물품 보유현황 제출 리스트" class="tit_2" position="absolute 0 117 232 140"/>
  24. <Button id="btn_grdadd" taborder="3" text="행추가" class="btn2" position="absolute 240 114 293 133" onclick="btn_grdadd_onclick" visible="false"/>
  25. <Button id="btn_grddel" taborder="4" text="행삭제" class="btn2" visible="false" position="absolute 296 114 349 133" onclick="btn_grddel_onclick"/>
  26. <Grid id="grd_deptgoodlist" taborder="5" binddataset="ds_main_grid_deptgoodlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 138 1195 782" anchor="all">
  27. <Formats>
  28. <Format id="default">
  29. <Columns>
  30. <Column size="19"/>
  31. <Column size="60"/>
  32. <Column size="125"/>
  33. <Column size="257"/>
  34. <Column size="100"/>
  35. <Column size="502"/>
  36. </Columns>
  37. <Rows>
  38. <Row size="24" band="head"/>
  39. <Row size="24"/>
  40. </Rows>
  41. <Band id="head">
  42. <Cell/>
  43. <Cell col="1" text="기관"/>
  44. <Cell col="2" text="부서코드"/>
  45. <Cell col="3" text="부서명"/>
  46. <Cell col="4" text="최종제출 여부"/>
  47. <Cell col="5" text="제출비고"/>
  48. </Band>
  49. <Band id="body">
  50. <Cell celltype="head"/>
  51. <Cell col="1" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:instcd"/>
  52. <Cell col="2" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:deptcd"/>
  53. <Cell col="3" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:deptnm"/>
  54. <Cell col="4" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:sendyn"/>
  55. <Cell col="5" displaytype="text" edittype="text" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:cmt"/>
  56. </Band>
  57. </Format>
  58. </Formats>
  59. </Grid>
  60. <Button id="button1" taborder="6" text="엑셀저장" class="btn7" position="absolute 1115 114 1195 133" onclick="button1_onclick" anchor="top right"/>
  61. <Static id="caption1" text="* 최종제출 여부 - 무 : 저장내역(X), Y : 최종제출, N : 저장내역(O).최종제출(X)" position="absolute 627 113 1111 133" style="background:#c4e693ff;" anchor="top right"/>
  62. </Layout>
  63. </Layouts>
  64. <Objects>
  65. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  66. <ColumnInfo>
  67. <Column id="instcd" type="STRING" size="256"/>
  68. <Column id="yyyy" type="STRING" size="256"/>
  69. </ColumnInfo>
  70. <Rows>
  71. <Row/>
  72. </Rows>
  73. </Dataset>
  74. <Dataset id="ds_main_grid_deptgoodlist" 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" sumtext="기관"/>
  77. <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
  78. <Column id="deptnm" type="STRING" size="256" sumtext="부서명"/>
  79. <Column id="sendyn" type="STRING" size="256" sumtext="최종제출여부"/>
  80. <Column id="cmt" type="STRING" size="256" sumtext="비고"/>
  81. <Column id="yyyy" type="STRING" size="256" sumtext="년도"/>
  82. </ColumnInfo>
  83. </Dataset>
  84. <Dataset id="ds_main_grid_deptgoodlist_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  85. <ColumnInfo>
  86. <Column id="instcd" type="STRING" size="256" sumtext="기관"/>
  87. <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
  88. <Column id="deptnm" type="STRING" size="256" sumtext="부서명"/>
  89. <Column id="sendyn" type="STRING" size="256" sumtext="최종제출여부"/>
  90. <Column id="cmt" type="STRING" size="256" sumtext="비고"/>
  91. <Column id="yyyy" type="STRING" size="256" sumtext="년도"/>
  92. </ColumnInfo>
  93. </Dataset>
  94. </Objects>
  95. <Bind>
  96. <BindItem id="item0" compid="grp_sea.cmb_instcd" propid="value" datasetid="ds_send" columnid="instcd"/>
  97. <BindItem id="item1" compid="grp_sea.ipt_yyyy" propid="value" datasetid="ds_send" columnid="yyyy"/>
  98. </Bind>
  99. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  100. * System Name :
  101. * Job Name :
  102. * Creator :
  103. * Make Date : 2017-06-19
  104. * Description :
  105. *---------------------------------------------------------------------------------------
  106. * Modify Date Modifier Modify Description
  107. *---------------------------------------------------------------------------------------
  108. * 2017-06-19 Live Converter TF->XP
  109. *
  110. *---------------------------------------------------------------------------------------
  111. ****************************************************************************************/
  112. include "com_commonxp::comm_main.xjs";
  113. include "mis_miscommonxp::MIS.xjs";
  114. function SMRFC00403_oninit(obj:Form, e:InitEventInfo)
  115. {
  116. frmf_initForm(obj);
  117. }
  118. function SMRFC00403_onload(obj:Form, e:LoadEventInfo)
  119. {
  120. grdf_initGrid(grd_deptgoodlist);
  121. grdf_setRowTypeIcon(grd_deptgoodlist, 0);
  122. fInitialize();
  123. }
  124. function fInitialize()
  125. {
  126. misfGridInit(grd_deptgoodlist);
  127. misfComboComCdList("C0048",grp_sea.cmb_instcd,"Y");
  128. grp_sea.cmb_instcd.value = sysf_getUserInfo("dutplceinstcd");
  129. ds_send.setColumn(0, "yyyy", String(utlf_getCurrentDate()).substring(0, 4));
  130. var dutplcecd = sysf_getUserInfo("dutplcecd");
  131. if(dutplcecd == "4020334000" || sysf_getUserInfo("userid") == "MIS" || sysf_getUserInfo("userid") == "99207" )
  132. {
  133. grp_sea.btn_search.click();
  134. }
  135. else
  136. {
  137. sysf_messageBox("물류팀외 조회할 수","I004");
  138. grp_sea.btn_search.enable = false;
  139. btn_save.enable = false;
  140. grp_sea.ipt_yyyy.enable = false;
  141. }
  142. }
  143. function grp_sea_cmb_instcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  144. {
  145. grp_sea.btn_search.click();
  146. }
  147. function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  148. {
  149. var yyyy = parseInt(ds_send.getColumn(0, "yyyy"));
  150. var year = parseInt(utlf_getCurrentDate().substring(0, 4));
  151. if(yyyy < '2017' || yyyy > year ) {
  152. sysf_messageBox("조회할 수 없는 년도","I009");
  153. return;
  154. }else{
  155. var oParam = {};
  156. oParam.id = "TRRFC00405";
  157. oParam.service = "purcbaseapp.PurcBaseMngt";
  158. oParam.method = "reqGetDeptGoodlist";
  159. oParam.inds = "req=ds_send";
  160. oParam.outds = "ds_main_grid_deptgoodlist=deptgoodlist";
  161. oParam.async = false;
  162. //oParam.callback = "cf_TRRFC00405";
  163. tranf_submit(oParam);
  164. ds_main_grid_deptgoodlist.addColumn("bkColor", "string");
  165. ds_main_grid_deptgoodlist.enableevent = false;
  166. ds_main_grid_deptgoodlist.updatecontrol = false;
  167. // 그리드 색깔표시
  168. for(var i = 0; i < ds_main_grid_deptgoodlist.rowcount; i++){
  169. var sendyn = ds_main_grid_deptgoodlist.getColumn(i, "sendyn");
  170. if(sendyn == "Y"){
  171. ds_main_grid_deptgoodlist.setColumn(i, "bkColor", "#FFFFCC");
  172. }else{
  173. ds_main_grid_deptgoodlist.setColumn(i, "bkColor", "#white");
  174. }
  175. }
  176. ds_main_grid_deptgoodlist.updatecontrol = true;
  177. ds_main_grid_deptgoodlist.enableevent = true;
  178. }
  179. }
  180. function button1_onclick(obj:Button, e:ClickEventInfo)
  181. {
  182. if( ds_main_grid_deptgoodlist.rowcount > 0 )
  183. {
  184. var fileName ="부서별 물품보유현황 제출내역_" + utlf_getCurrentDate();
  185. grdf_exportExcel(grd_deptgoodlist, fileName, "Sheet", "true", "", "");
  186. }
  187. else
  188. {
  189. sysf_messageBox("저장 데이터가","I004");
  190. }
  191. }
  192. function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  193. {
  194. misfGridIUD(grd_deptgoodlist, "A");
  195. }
  196. function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  197. {
  198. misfGridIUD(grd_deptgoodlist, "D");
  199. }
  200. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  201. {
  202. var updtdata = grdf_getGridUpdateData(grd_deptgoodlist).rowcount;
  203. if (updtdata == 0)
  204. {
  205. sysf_messageBox("변경된 데이터가","I004");
  206. return;
  207. }
  208. if(!frmf_chkMdtGrid(grd_deptgoodlist, [1,2,3,4], ["기관", "부서코드", "부서명", "최종제출여부"])) return;
  209. //if(!checkKeyColumn("grd_deptgoodlist")) return;
  210. rtn = sysf_messageBox("", "Q002");
  211. if(rtn != "6" ) return false;
  212. // var oParam = {};
  213. // oParam.id = "TXRFC00403";
  214. // oParam.service = "purcbaseapp.PurcBaseMngt";
  215. // oParam.method = "setProplist";
  216. // oParam.inds = "req=ds_main_grid_deptgoodlist:u";
  217. // oParam.outds = "";
  218. // oParam.async = false;
  219. // //oParam.callback = "cf_TXRFC00403";
  220. //
  221. // tranf_submit(oParam);
  222. ds_main_grid_deptgoodlist.enableevent = false;
  223. ds_main_grid_deptgoodlist.updatecontrol = false;
  224. grdf_setStatusColumn(ds_main_grid_deptgoodlist, "mode");
  225. ds_main_grid_deptgoodlist.updatecontrol = true;
  226. ds_main_grid_deptgoodlist.enableevent = true;
  227. ds_main_grid_deptgoodlist_temp.assign(ds_main_grid_deptgoodlist);
  228. ds_main_grid_deptgoodlist_temp.enableevent = false;
  229. ds_main_grid_deptgoodlist_temp.updatecontrol = false;
  230. for( var i=0 ; i<ds_main_grid_deptgoodlist_temp.rowcount ; i++ ){
  231. if( ds_main_grid_deptgoodlist_temp.getColumn(i, "instcd") == "본원" ){
  232. ds_main_grid_deptgoodlist_temp.setColumn(i, "instcd", "031");
  233. }else{
  234. ds_main_grid_deptgoodlist_temp.setColumn(i, "instcd", "032");
  235. }
  236. }
  237. ds_main_grid_deptgoodlist_temp.updatecontrol = true;
  238. ds_main_grid_deptgoodlist_temp.enableevent = true;
  239. var oParam = {};
  240. oParam.id = "TXRFC00407";
  241. oParam.service = "purcbaseapp.PurcBaseMngt";
  242. oParam.method = "setDeptGoodlist";
  243. oParam.inds = "req=ds_main_grid_deptgoodlist_temp:u";
  244. oParam.outds = "";
  245. oParam.async = false;
  246. //oParam.callback = "cf_TXRFC00407";
  247. tranf_submit(oParam);
  248. grp_sea.btn_search.click();
  249. }
  250. function grp_sea_ipt_yyyy_onkeydown(obj:Edit, e:KeyEventInfo)
  251. {
  252. if(e.keycode == "13"){
  253. obj.updateToDataset();
  254. grp_sea.ipt_yyyy.setFocus();
  255. misfNoFormat();
  256. grp_sea_btn_search_onclick();
  257. }
  258. }
  259. function grp_sea_ipt_yyyy_onkillfocus(obj:Edit, e:KillFocusEventInfo)
  260. {
  261. grp_sea_btn_search_onclick();
  262. }
  263. ]]></Script>
  264. </Form>
  265. </FDL>