SMAEB01200_장비코드관리.xfdl 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAEB01200" position="absolute 0 0 1195 780" titletext="장비코드관리" oninit="SMAEB01200_oninit" onload="SMAEB01200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="장비코드 관리" position="absolute 0 0 110 26" id="caption6" class="tit_1"/>
  8. <Div position="absolute 0 25 1195 60" align="align:center top;" id="grp_sea" class="div_SA" anchor="left top right">
  9. <Layouts>
  10. <Layout>
  11. <Shape position="absolute 1113 7 1119 29" linetype="vertical" id="line13" class="line_4" anchor="top right"/>
  12. <Button position="absolute 1125 7 1181 29" id="btn_sea" class="btn1" text="조회" anchor="top right" onclick="grp_sea_btn_sea_onclick"/>
  13. <Edit position="absolute 104 9 204 28" id="ipt_basecd" class="input_search" anchor="default" onkeydown="grp_sea_ipt_basecd_onkeydown"/>
  14. <Static text="장비코드 :" position="absolute 15 9 101 26" id="caption25" class="search_name" anchor="default"/>
  15. </Layout>
  16. </Layouts>
  17. </Div>
  18. <Shape position="absolute 0 87 1195 91" linetype="horizontal" id="line2" class="line_1" anchor="left top right"/>
  19. <Button position="absolute 1085 67 1138 86" id="btn_grdadd" class="btn2" text="행추가" onclick="btn_grdadd_onclick" anchor="top right"/>
  20. <Button position="absolute 1142 67 1195 86" id="btn_grddel" class="btn2" text="행삭제" onclick="btn_grddel_onclick" anchor="top right"/>
  21. <Grid position="absolute 0 89 1195 756" id="grd_eqmtlist" binddataset="ds_main_eqmtlist" onrbuttondown="grd_eqmtlist_onrbuttondown" autoenter="key" cellsizingtype="col" selecttype="multirow" anchor="all">
  22. <Formats>
  23. <Format id="default">
  24. <Columns>
  25. <Column size="25"/>
  26. <Column size="40"/>
  27. <Column size="241"/>
  28. <Column size="393"/>
  29. <Column size="309"/>
  30. <Column size="120"/>
  31. <Column size="0"/>
  32. <Column size="0"/>
  33. </Columns>
  34. <Rows>
  35. <Row size="24" band="head"/>
  36. <Row size="24"/>
  37. </Rows>
  38. <Band id="head">
  39. <Cell/>
  40. <Cell col="1" text="순번"/>
  41. <Cell col="2" text="자산코드"/>
  42. <Cell col="3" text="장비명"/>
  43. <Cell col="4" text="비고"/>
  44. <Cell col="5" text="장비구분"/>
  45. <Cell col="6"/>
  46. <Cell col="7"/>
  47. </Band>
  48. <Band id="body">
  49. <Cell/>
  50. <Cell col="1" displaytype="text" edittype="text" text="bind:sortno"/>
  51. <Cell col="2" displaytype="text" edittype="text" text="bind:basecd"/>
  52. <Cell col="3" displaytype="text" edittype="text" text="bind:basecdflagdesc"/>
  53. <Cell col="4" displaytype="text" edittype="text" text="bind:basecdcnts"/>
  54. <Cell col="5" displaytype="text" edittype="text" text="bind:excuposseqcd"/>
  55. <Cell col="6" displaytype="text" edittype="text" text="bind:basesuppdeptcd"/>
  56. <Cell col="7" displaytype="text" edittype="text" text="bind:basecdflag"/>
  57. </Band>
  58. </Format>
  59. </Formats>
  60. </Grid>
  61. <Button position="absolute 997 67 1083 86" id="btn_fixasetcd" class="btn2" visible="true" text="장비코드조회" onclick="btn_fixasetcd_onclick" anchor="top right"/>
  62. <Button position="absolute 590 62 690 82" id="button1" visible="false" text="button1" onclick="button1_onclick"/>
  63. <Button position="absolute 1139 758 1195 780" id="btn_save" class="btn4" text="저장" onsetfocus="btn_save_onsetfocus" onclick="btn_save_onclick" anchor="right bottom"/>
  64. </Layout>
  65. </Layouts>
  66. <Objects>
  67. <Dataset id="ds_main_eqmtlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  68. <ColumnInfo>
  69. <Column id="sortno" type="STRING"/>
  70. <Column id="basecd" type="STRING"/>
  71. <Column id="basecdflagdesc" type="STRING"/>
  72. <Column id="basecdcnts" type="STRING"/>
  73. <Column id="excuposseqcd" type="STRING"/>
  74. <Column id="basesuppdeptcd" type="STRING"/>
  75. <Column id="basecdflag" type="STRING"/>
  76. </ColumnInfo>
  77. </Dataset>
  78. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  79. <ColumnInfo>
  80. <Column id="basecd" type="STRING" size="256"/>
  81. <Column id="kbasecdflag" type="STRING" size="256"/>
  82. <Column id="basesuppdeptcd" type="STRING" size="256"/>
  83. </ColumnInfo>
  84. <Rows>
  85. <Row>
  86. <Col id="basecd"/>
  87. <Col id="basesuppdeptcd"/>
  88. <Col id="kbasecdflag"/>
  89. </Row>
  90. </Rows>
  91. </Dataset>
  92. </Objects>
  93. <Bind>
  94. <BindItem id="item0" compid="grp_sea.ipt_basecd" propid="value" datasetid="ds_send" columnid="basecd"/>
  95. </Bind>
  96. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  97. * System Name :
  98. * Job Name :
  99. * Creator :
  100. * Make Date : 2016-03-29
  101. * Description :
  102. *---------------------------------------------------------------------------------------
  103. * Modify Date Modifier Modify Description
  104. *---------------------------------------------------------------------------------------
  105. * 2016-03-29 Live Converter TF->XP
  106. *
  107. *---------------------------------------------------------------------------------------
  108. ****************************************************************************************/
  109. //=======================================================================================
  110. // Lib Include
  111. //---------------------------------------------------------------------------------------
  112. include "com_commonxp::comm_main.xjs";
  113. include "ast_commonxp::AST.xjs";
  114. include "ast_examcurexp::AEZ0001.xjs";
  115. //=======================================================================================
  116. // Global Form Variable
  117. //---------------------------------------------------------------------------------------
  118. //=======================================================================================
  119. // Function
  120. //---------------------------------------------------------------------------------------
  121. /****************************************************************************************
  122. * Function : lf_Init
  123. * Description : 초기화
  124. * Argument :
  125. * retrun type :
  126. * Creator :
  127. ****************************************************************************************/
  128. function lf_Init(){
  129. ds_main_eqmtlist.clearData();
  130. }
  131. /****************************************************************************************
  132. * Function : fPopupRpirMngtList
  133. * Description : 장비 검교정관리를 호출하기 위한 Function
  134. * Argument :
  135. * retrun type :
  136. * Creator :
  137. ****************************************************************************************/
  138. function fPopupRpirMngtList() {
  139. var rowidx = ds_main_eqmtlist.rowposition;
  140. var objArg = new Object();
  141. objArg.arg_basecd = utlf_transNullToEmpty(ds_main_eqmtlist.getColumn(rowidx, "basecd"));
  142. frmf_modal("SMAEQ01200", "SMAEQ01200", objArg, null, null, null, null, null, null, null, null, null, "M");
  143. //modal("SMAEQ01200","","","","SMAEQ01200", "/root/main/eqmtlist/item["+rowidx+"]/basecd", "/root/send/basecd", "min:visible; max:true; resize:true;");
  144. }
  145. /****************************************************************************************
  146. * Argument : 01.sSvcId : 서비스 ID
  147. * : 02.nErrorCode : 에러코드
  148. * : 03.sErrorMsg : 에러메시지
  149. * Description : 의 콜백함수
  150. ****************************************************************************************/
  151. function cf_(sSvcId, nErrorCode, sErrorMsg) {
  152. if(nErrorCode < 0) return;
  153. }
  154. //=======================================================================================
  155. // Event
  156. //---------------------------------------------------------------------------------------
  157. /****************************************************************************************
  158. * Components : Form
  159. * Components ID : SMAEB01200
  160. * Event : oninit
  161. * Argument : 01.obj : Object Event has occurred
  162. * : 02.e : Event Object
  163. * Description : 화면 초기화
  164. ****************************************************************************************/
  165. function SMAEB01200_oninit(obj:Form, e:InitEventInfo)
  166. {
  167. frmf_initForm(obj);
  168. }
  169. /****************************************************************************************
  170. * Components : Form
  171. * Components ID : SMAEB01200
  172. * Event : onload
  173. * Argument : 01.obj : Object Event has occurred
  174. * : 02.e : Event Object
  175. * Description : 화면 초기화
  176. ****************************************************************************************/
  177. function SMAEB01200_onload(obj:Form, e:LoadEventInfo)
  178. {
  179. grdf_setRowTypeIcon(grd_eqmtlist, 0);
  180. lf_Init();
  181. lf_aezfSetSuppDeptcd();
  182. grp_sea.ipt_basecd.setFocus();
  183. frmf_createPopupMenu("pmn_popupMenu"
  184. ,"fPopupRpirMngtList"
  185. ,[{id: "1", level: "0", title: "장비검교정관리"}]
  186. );
  187. }
  188. /****************************************************************************************
  189. * Components : Button
  190. * Components ID : grp_sea.btn_sea
  191. * Event : onclick
  192. * Argument : 01.obj : Object Event has occurred
  193. * : 02.e : Event Object
  194. * Description : 조회 버튼 클릭
  195. ****************************************************************************************/
  196. function grp_sea_btn_sea_onclick(obj:Button, e:ClickEventInfo)
  197. {
  198. ds_send.setColumn(0, "basesuppdeptcd", suppdeptcd);
  199. dsf_setFixVal(ds_send, "kbasecdflag:J");
  200. ds_main_eqmtlist.clearData();
  201. var oParam = {};
  202. oParam.id = "TRAEB01201";
  203. oParam.service = "examcurebaseapp.GoodCode";
  204. oParam.method = "reqGetEqmtCodeList";
  205. oParam.inds = "req=ds_send";
  206. oParam.outds = "ds_main_eqmtlist=item";
  207. oParam.async = false;
  208. //oParam.callback = "cf_TRAEB01201";
  209. tranf_submit(oParam);
  210. }
  211. /****************************************************************************************
  212. * Components : Button
  213. * Components ID : grp_sea.ipt_basecd
  214. * Event : onkeydown
  215. * Argument : 01.obj : Object Event has occurred
  216. * : 02.e : Event Object
  217. * Description : 장비코드 Enter Event
  218. ****************************************************************************************/
  219. function grp_sea_ipt_basecd_onkeydown(obj:Edit, e:KeyEventInfo)
  220. {
  221. if ( e.keycode == 13 ) {
  222. obj.updateToDataset();
  223. grp_sea.btn_sea.click();
  224. }
  225. }
  226. /****************************************************************************************
  227. * Components : Button
  228. * Components ID : btn_grdadd
  229. * Event : onclick
  230. * Argument : 01.obj : Object Event has occurred
  231. * : 02.e : Event Object
  232. * Description : 행추가 버튼
  233. ****************************************************************************************/
  234. function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  235. {
  236. var nRow = ds_main_eqmtlist.addRow();
  237. if( ds_main_eqmtlist.getColumnInfo("basesuppdeptcd") == null )
  238. ds_main_eqmtlist.addColumn("basesuppdeptcd", "STRING");
  239. if( ds_main_eqmtlist.getColumnInfo("basecdflag") == null )
  240. ds_main_eqmtlist.addColumn("basecdflag", "STRING");
  241. ds_main_eqmtlist.setColumn(nRow, "basesuppdeptcd", suppdeptcd);
  242. ds_main_eqmtlist.setColumn(nRow, "basecdflag", "J");
  243. }
  244. /****************************************************************************************
  245. * Components : Button
  246. * Components ID : btn_grddel
  247. * Event : onclick
  248. * Argument : 01.obj : Object Event has occurred
  249. * : 02.e : Event Object
  250. * Description : 행삭제 버튼
  251. ****************************************************************************************/
  252. function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  253. {
  254. dsf_deleteSelectedRows(grd_eqmtlist, true);
  255. }
  256. /****************************************************************************************
  257. * Components : Grid
  258. * Components ID : grd_eqmtlist
  259. * Event : onrbuttondown
  260. * Argument : 01.obj : Object Event has occurred
  261. * : 02.e : Event Object
  262. * Description : 그리드 우클릭 이벤트
  263. ****************************************************************************************/
  264. function grd_eqmtlist_onrbuttondown(obj:Grid, e:GridMouseEventInfo)
  265. {
  266. if(e.row > -1){
  267. grdf_setSelectedCell(obj, e);
  268. pmn_popupMenu.trackPopup(e.screenX,e.screenY);
  269. }
  270. }
  271. /****************************************************************************************
  272. * Components : Button
  273. * Components ID : btn_fixasetcd
  274. * Event : onclick
  275. * Argument : 01.obj : Object Event has occurred
  276. * : 02.e : Event Object
  277. * Description : 장비코드조회 버튼
  278. ****************************************************************************************/
  279. function btn_fixasetcd_onclick(obj:Button, e:ClickEventInfo)
  280. {
  281. var nRow = ds_main_eqmtlist.addRow();
  282. frmf_setParameter("SPAEB00101_param_srcXpath1", "ds_main_eqmtlist");
  283. frmf_setParameter("SPAEB00101_param_srcXgrid1", "grd_eqmtlist");
  284. frmf_setParameter("SPAEB00101_param_srcXrow1", nRow);
  285. frmf_setParameter("SPAEB00101_param_srcXnode1", "basecd");
  286. frmf_setParameter("SPAEB00101_param_srcXnodenm1", "basecdflagdesc");
  287. frmf_modal("SPAEB00101", "SPAEB00101", null, null, null, null, null, null, null, null, null, null, "M");
  288. if( ds_main_eqmtlist.getColumnInfo("basesuppdeptcd") == null )
  289. ds_main_eqmtlist.addColumn("basesuppdeptcd", "STRING");
  290. if( ds_main_eqmtlist.getColumnInfo("basecdflag") == null )
  291. ds_main_eqmtlist.addColumn("basecdflag", "STRING");
  292. ds_main_eqmtlist.setColumn(nRow, "sortno", "0");
  293. ds_main_eqmtlist.setColumn(nRow, "basecd", "0");
  294. ds_main_eqmtlist.setColumn(nRow, "basecdflagdesc", "0");
  295. ds_main_eqmtlist.setColumn(nRow, "basesuppdeptcd", suppdeptcd);
  296. ds_main_eqmtlist.setColumn(nRow, "basecdflag", "J");
  297. }
  298. /****************************************************************************************
  299. * Components : Button
  300. * Components ID : button1
  301. * Event : onclick
  302. * Argument : 01.obj : Object Event has occurred
  303. * : 02.e : Event Object
  304. * Description : ??
  305. ****************************************************************************************/
  306. function button1_onclick(obj:Button, e:ClickEventInfo)
  307. {
  308. alert(ds_main_eqmtlist.getRowType(ds_main_eqmtlist.rowposition));
  309. }
  310. /****************************************************************************************
  311. * Components : Button
  312. * Components ID : btn_save
  313. * Event : onsetfocus
  314. * Argument : 01.obj : Object Event has occurred
  315. * : 02.e : Event Object
  316. * Description : 저장 버튼
  317. ****************************************************************************************/
  318. function btn_save_onsetfocus(obj:Button, e:SetFocusEventInfo)
  319. {
  320. //checkKeyColumn("grd_eqmtlist");
  321. }
  322. /****************************************************************************************
  323. * Components : Button
  324. * Components ID : btn_save
  325. * Event : onclick
  326. * Argument : 01.obj : Object Event has occurred
  327. * : 02.e : Event Object
  328. * Description : 저장 버튼
  329. ****************************************************************************************/
  330. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  331. {
  332. if ( sysf_messageBox("","Q002")==6 ) {
  333. dsf_createDs("ds_send_req");
  334. var oDsUpdate = grdf_getGridUpdateData(grd_eqmtlist);
  335. grdf_setStatusColumn(oDsUpdate, "m");
  336. ds_send_req.copyData(oDsUpdate, true);
  337. if(ds_send_req.getRowCount() < 1 ){
  338. sysf_messageBox("업데이트 정보가 없습니다.", "I");
  339. return 0;
  340. } else {
  341. dsf_createDs("ds_hidden", [{col:"count", type:"STRING", size:256}]);
  342. if( !utlf_isNull(ds_send_req.getColumnInfo("basecdflag")))
  343. ds_send_req.updateColID("basecdflag", "kbasecdflag");
  344. dsf_setTypeFormat(ds_send_req, "sortno:BICDECIMAL");
  345. var oParam = {};
  346. oParam.id = "TXAEB01201";
  347. oParam.service = "examcurebaseapp.GoodCode";
  348. oParam.method = "reqExeEqmtCodeList";
  349. oParam.inds = "req=ds_send_req";
  350. oParam.outds = "ds_hidden=item";
  351. oParam.async = false;
  352. //oParam.callback = "cf_TXAEB01201";
  353. tranf_submit(oParam);
  354. }
  355. }
  356. grp_sea.btn_sea.click();
  357. }
  358. ]]></Script>
  359. </Form>
  360. </FDL>