SMRSM00800_유해위험성코드.xfdl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRSM00800" position="absolute 0 0 1197 761" titletext="유해위험성 코드 관리" oninit="SMRSM00800_oninit" onload="SMRSM00800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="유해위험성 코드 관리" position="absolute 0 0 163 25" id="caption1" class="tit_1" onclick="caption1_onclick" anchor="left top"/>
  8. <Shape position="absolute 0 116 1195 122" linetype="horizontal" id="line7" class="line_10" anchor="left top right"/>
  9. <Static text="코드별 상세정보" position="absolute 1 99 122 115" id="caption4" class="tit_2" anchor="left top"/>
  10. <Button position="absolute 1086 95 1139 114" id="btn_grdadd" class="btn2" text="행추가" anchor="top right" onclick="btn_grdadd_onclick"/>
  11. <Button position="absolute 1142 95 1195 114" id="btn_grddel" class="btn2" text="행삭제" anchor="top right" onclick="btn_grddel_onclick"/>
  12. <Static text="※ 사용된 코드는 삭제하지 말고, 사용여부를 &quot;No&quot; 로 변경 후 저장하시기 바랍니다." position="absolute 0 735 503 755" id="caption3" style="color:red;" anchor="left bottom"/>
  13. <Shape id="line2" linetype="horizontal" class="line_6" position="absolute 0 30 1195 36" anchor="left top right"/>
  14. <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1139 11 1195 33" anchor="top right" onclick="btn_save_onclick"/>
  15. <Grid id="datagrid1" taborder="2" binddataset="ds_main_codeinfo_codelist" useinputpanel="false" position="absolute 0 121 1195 730" anchor="all" cellsizingtype="col">
  16. <Formats>
  17. <Format id="default">
  18. <Columns>
  19. <Column size="32" band="left"/>
  20. <Column size="57"/>
  21. <Column size="291"/>
  22. <Column size="72"/>
  23. <Column size="69"/>
  24. <Column size="333"/>
  25. <Column size="0"/>
  26. </Columns>
  27. <Rows>
  28. <Row size="24" band="head"/>
  29. <Row size="24"/>
  30. </Rows>
  31. <Band id="head">
  32. <Cell/>
  33. <Cell col="1" text="코드"/>
  34. <Cell col="2" text="코드명"/>
  35. <Cell col="3" text="사용여부"/>
  36. <Cell col="4" text="출력순서"/>
  37. <Cell col="5" text="비 고"/>
  38. <Cell col="6" text="harmcls"/>
  39. </Band>
  40. <Band id="body">
  41. <Cell celltype="head"/>
  42. <Cell col="1" text="bind:harmcd" enable="false"/>
  43. <Cell col="2" displaytype="text" edittype="text" text="bind:harmnm"/>
  44. <Cell col="3" displaytype="combo" edittype="combo" style="align:center middle;" text="bind:useyn" combodataset="ds_useryn" combocodecol="value" combodatacol="label"/>
  45. <Cell col="4" displaytype="text" edittype="text" style="align:center;" text="bind:dispseq"/>
  46. <Cell col="5" displaytype="text" edittype="text" text="bind:cmt"/>
  47. <Cell col="6" text="bind:harmcls"/>
  48. </Band>
  49. </Format>
  50. </Formats>
  51. </Grid>
  52. <Div id="grp_sea" taborder="3" position="absolute 0 33 1196 73" class="div_SA2" anchor="left top right">
  53. <Layouts>
  54. <Layout>
  55. <Button id="btn_search" taborder="0" text="조회" class="btn1" position="absolute 290 9 346 31" anchor="left top" onclick="grp_sea_btn_search_onclick"/>
  56. <Shape id="line6" linetype="vertical" position="absolute 272 8 278 30" anchor="left top"/>
  57. <Combo id="cmb_harmcls" taborder="1" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 96 10 260 29" anchor="left top" onitemchanged="grp_sea_cmb_harmcls_onitemchanged">
  58. <Dataset id="innerdataset">
  59. <ColumnInfo>
  60. <Column id="codecolumn"/>
  61. <Column id="datacolumn"/>
  62. </ColumnInfo>
  63. <Rows>
  64. <Row>
  65. <Col id="codecolumn">A</Col>
  66. <Col id="datacolumn">물리적위험성</Col>
  67. </Row>
  68. <Row>
  69. <Col id="codecolumn">B</Col>
  70. <Col id="datacolumn">건강유해성</Col>
  71. </Row>
  72. <Row>
  73. <Col id="codecolumn">C</Col>
  74. <Col id="datacolumn">환경유해성</Col>
  75. </Row>
  76. </Rows>
  77. </Dataset>
  78. </Combo>
  79. <Static id="caption2" text="분류" class="search_name" position="absolute 39 11 90 28" anchor="left top"/>
  80. </Layout>
  81. </Layouts>
  82. </Div>
  83. </Layout>
  84. </Layouts>
  85. <Objects>
  86. <Dataset id="ds_main_codeinfo_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  87. <ColumnInfo>
  88. <Column id="harmcd" type="STRING"/>
  89. <Column id="harmnm" type="STRING"/>
  90. <Column id="useyn" type="STRING"/>
  91. <Column id="dispseq" type="STRING"/>
  92. <Column id="cmt" type="STRING"/>
  93. <Column id="harmcls" type="STRING"/>
  94. </ColumnInfo>
  95. </Dataset>
  96. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  97. <ColumnInfo>
  98. <Column id="harmcls" type="STRING" size="256"/>
  99. </ColumnInfo>
  100. <Rows>
  101. <Row/>
  102. </Rows>
  103. </Dataset>
  104. <Dataset id="ds_useryn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  105. <ColumnInfo>
  106. <Column id="label" type="STRING" size="256"/>
  107. <Column id="value" type="STRING" size="256"/>
  108. </ColumnInfo>
  109. <Rows>
  110. <Row>
  111. <Col id="label">Yes</Col>
  112. <Col id="value">Y</Col>
  113. </Row>
  114. <Row>
  115. <Col id="label">No</Col>
  116. <Col id="value">N</Col>
  117. </Row>
  118. </Rows>
  119. </Dataset>
  120. <Dataset id="ds_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  121. <ColumnInfo>
  122. <Column id="count" type="STRING" size="256" sumtext="실행건수"/>
  123. </ColumnInfo>
  124. </Dataset>
  125. </Objects>
  126. <Bind>
  127. <BindItem id="item0" compid="grp_sea.cmb_harmcls" propid="value" datasetid="ds_send_reqdata" columnid="harmcls"/>
  128. </Bind>
  129. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  130. * System Name :
  131. * Job Name :
  132. * Creator :
  133. * Make Date : 2017-06-19
  134. * Description :
  135. *---------------------------------------------------------------------------------------
  136. * Modify Date Modifier Modify Description
  137. *---------------------------------------------------------------------------------------
  138. * 2017-06-19 Live Converter TF->XP
  139. *
  140. *---------------------------------------------------------------------------------------
  141. ****************************************************************************************/
  142. include "com_commonxp::comm_main.xjs";
  143. //include "ast_tumorelctxp::combolist.xjs";
  144. include "mis_miscommonxp::MIS.xjs";
  145. function SMRSM00800_oninit(obj:Form, e:InitEventInfo)
  146. {
  147. frmf_initForm(obj);
  148. }
  149. function SMRSM00800_onload(obj:Form, e:LoadEventInfo)
  150. {
  151. grdf_initGrid(datagrid1);
  152. grdf_setRowTypeIcon(datagrid1, 0);
  153. grp_sea.cmb_harmcls.value = "A";
  154. fGetCodeList();
  155. }
  156. function fGetCodeList()
  157. {
  158. misfGridInit(datagrid1);
  159. var oParam = {};
  160. oParam.id = "TRRSM00801";
  161. oParam.service = "purcbaseapp.PurcBaseMngt";
  162. oParam.method = "reqGetHarmcdList";
  163. oParam.inds = "req=ds_send_reqdata";
  164. oParam.outds = "ds_main_codeinfo_codelist=codelist";
  165. oParam.async = false;
  166. //oParam.callback = "cf_TRRSM00801";
  167. tranf_submit(oParam);
  168. }
  169. //행추가버튼
  170. function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  171. {
  172. var imaxcd = 0; //코드의 최대값을 넣음
  173. var iharmcd = 0; //코드를 integer로 변경한 값
  174. var smaxcd = ""; //코드를 string으로 변경한 값
  175. for(var i = 0; i < ds_main_codeinfo_codelist.rowcount; i++)
  176. {
  177. iharmcd = parseInt(ds_main_codeinfo_codelist.getColumn(i, "harmcd"), 10);
  178. if( iharmcd > imaxcd )
  179. {
  180. imaxcd = iharmcd;
  181. }
  182. }
  183. imaxcd = imaxcd + 1 ; // 최대값 + 1 이 추가한 행의 코드번호가 된다.
  184. if(imaxcd < 10)
  185. {
  186. smaxcd = "0" + imaxcd ;
  187. }
  188. else
  189. {
  190. smaxcd = "" + imaxcd;
  191. }
  192. ds_main_codeinfo_codelist.addRow();
  193. var irow = ds_main_codeinfo_codelist.rowposition;
  194. ds_main_codeinfo_codelist.setColumn(irow, "harmcd", smaxcd);
  195. ds_main_codeinfo_codelist.setColumn(irow, "harmcls", ds_send_reqdata.getColumn(0, "harmcls"));
  196. ds_main_codeinfo_codelist.setColumn(irow, "useyn", "Y");
  197. }
  198. function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  199. {
  200. var deptrow = ds_main_codeinfo_codelist.rowposition;
  201. var arrPostion = new Array();
  202. arrPostion[0] = deptrow;
  203. var status = ds_main_codeinfo_codelist.getRowType(arrPostion)
  204. if(status == 1)
  205. {
  206. grdf_setStatus(datagrid1, "D", arrPostion);
  207. }
  208. else if(status == 2)
  209. {
  210. ds_main_codeinfo_codelist.deleteRow(deptrow);
  211. }
  212. else if(status == 4)
  213. {
  214. ds_main_codeinfo_codelist.deleteRow(deptrow);
  215. }
  216. else if(status == 8)
  217. {
  218. grdf_setStatus(datagrid1, "", arrPostion);
  219. }
  220. }
  221. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  222. {
  223. if(datacheck() == false)
  224. {
  225. return;
  226. }
  227. ExecData();
  228. }
  229. function datacheck()
  230. {
  231. for(var i = 0; i < ds_main_codeinfo_codelist.rowcount; i++)
  232. {
  233. if( utlf_isNull(ds_main_codeinfo_codelist.getColumn(i, "harmnm")))
  234. {
  235. sysf_messageBox("코드명은 필수 입력항목입니다.", "E999", "");
  236. return false;
  237. }
  238. }
  239. return true;
  240. }
  241. function ExecData()
  242. {
  243. var oParam = {};
  244. oParam.id = "TXRSM00801";
  245. oParam.service = "purcbaseapp.PurcBaseMngt";
  246. oParam.method = "reqExeSaveHarmcd";
  247. oParam.inds = "codelist=ds_main_codeinfo_codelist:U";
  248. oParam.outds = "ds_item=item";
  249. oParam.async = false;
  250. //oParam.callback = "cf_TXRSM00801";
  251. tranf_submit(oParam);
  252. grp_sea.btn_search.click();
  253. }
  254. function grp_sea_cmb_harmcls_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  255. {
  256. fGetCodeList();
  257. }
  258. function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  259. {
  260. fGetCodeList();
  261. }
  262. ]]></Script>
  263. </Form>
  264. </FDL>