123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRSM00800" position="absolute 0 0 1197 761" titletext="유해위험성 코드 관리" oninit="SMRSM00800_oninit" onload="SMRSM00800_onload">
- <Layouts>
- <Layout>
- <Static text="유해위험성 코드 관리" position="absolute 0 0 163 25" id="caption1" class="tit_1" onclick="caption1_onclick" anchor="left top"/>
- <Shape position="absolute 0 116 1195 122" linetype="horizontal" id="line7" class="line_10" anchor="left top right"/>
- <Static text="코드별 상세정보" position="absolute 1 99 122 115" id="caption4" class="tit_2" anchor="left top"/>
- <Button position="absolute 1086 95 1139 114" id="btn_grdadd" class="btn2" text="행추가" anchor="top right" onclick="btn_grdadd_onclick"/>
- <Button position="absolute 1142 95 1195 114" id="btn_grddel" class="btn2" text="행삭제" anchor="top right" onclick="btn_grddel_onclick"/>
- <Static text="※ 사용된 코드는 삭제하지 말고, 사용여부를 "No" 로 변경 후 저장하시기 바랍니다." position="absolute 0 735 503 755" id="caption3" style="color:red;" anchor="left bottom"/>
- <Shape id="line2" linetype="horizontal" class="line_6" position="absolute 0 30 1195 36" anchor="left top right"/>
- <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1139 11 1195 33" anchor="top right" onclick="btn_save_onclick"/>
- <Grid id="datagrid1" taborder="2" binddataset="ds_main_codeinfo_codelist" useinputpanel="false" position="absolute 0 121 1195 730" anchor="all" cellsizingtype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="32" band="left"/>
- <Column size="57"/>
- <Column size="291"/>
- <Column size="72"/>
- <Column size="69"/>
- <Column size="333"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="코드"/>
- <Cell col="2" text="코드명"/>
- <Cell col="3" text="사용여부"/>
- <Cell col="4" text="출력순서"/>
- <Cell col="5" text="비 고"/>
- <Cell col="6" text="harmcls"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:harmcd" enable="false"/>
- <Cell col="2" displaytype="text" edittype="text" text="bind:harmnm"/>
- <Cell col="3" displaytype="combo" edittype="combo" style="align:center middle;" text="bind:useyn" combodataset="ds_useryn" combocodecol="value" combodatacol="label"/>
- <Cell col="4" displaytype="text" edittype="text" style="align:center;" text="bind:dispseq"/>
- <Cell col="5" displaytype="text" edittype="text" text="bind:cmt"/>
- <Cell col="6" text="bind:harmcls"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Div id="grp_sea" taborder="3" position="absolute 0 33 1196 73" class="div_SA2" anchor="left top right">
- <Layouts>
- <Layout>
- <Button id="btn_search" taborder="0" text="조회" class="btn1" position="absolute 290 9 346 31" anchor="left top" onclick="grp_sea_btn_search_onclick"/>
- <Shape id="line6" linetype="vertical" position="absolute 272 8 278 30" anchor="left top"/>
- <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">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">A</Col>
- <Col id="datacolumn">물리적위험성</Col>
- </Row>
- <Row>
- <Col id="codecolumn">B</Col>
- <Col id="datacolumn">건강유해성</Col>
- </Row>
- <Row>
- <Col id="codecolumn">C</Col>
- <Col id="datacolumn">환경유해성</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Static id="caption2" text="분류" class="search_name" position="absolute 39 11 90 28" anchor="left top"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_codeinfo_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="harmcd" type="STRING"/>
- <Column id="harmnm" type="STRING"/>
- <Column id="useyn" type="STRING"/>
- <Column id="dispseq" type="STRING"/>
- <Column id="cmt" type="STRING"/>
- <Column id="harmcls" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="harmcls" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_useryn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="label" type="STRING" size="256"/>
- <Column id="value" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="label">Yes</Col>
- <Col id="value">Y</Col>
- </Row>
- <Row>
- <Col id="label">No</Col>
- <Col id="value">N</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="count" type="STRING" size="256" sumtext="실행건수"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.cmb_harmcls" propid="value" datasetid="ds_send_reqdata" columnid="harmcls"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-06-19
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-06-19 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
-
- include "com_commonxp::comm_main.xjs";
- //include "ast_tumorelctxp::combolist.xjs";
- include "mis_miscommonxp::MIS.xjs";
- function SMRSM00800_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRSM00800_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(datagrid1);
- grdf_setRowTypeIcon(datagrid1, 0);
- grp_sea.cmb_harmcls.value = "A";
- fGetCodeList();
- }
- function fGetCodeList()
- {
- misfGridInit(datagrid1);
-
- var oParam = {};
- oParam.id = "TRRSM00801";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqGetHarmcdList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_codeinfo_codelist=codelist";
- oParam.async = false;
- //oParam.callback = "cf_TRRSM00801";
- tranf_submit(oParam);
- }
- //행추가버튼
- function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
- {
- var imaxcd = 0; //코드의 최대값을 넣음
- var iharmcd = 0; //코드를 integer로 변경한 값
- var smaxcd = ""; //코드를 string으로 변경한 값
-
- for(var i = 0; i < ds_main_codeinfo_codelist.rowcount; i++)
- {
- iharmcd = parseInt(ds_main_codeinfo_codelist.getColumn(i, "harmcd"), 10);
-
- if( iharmcd > imaxcd )
- {
- imaxcd = iharmcd;
- }
- }
-
- imaxcd = imaxcd + 1 ; // 최대값 + 1 이 추가한 행의 코드번호가 된다.
- if(imaxcd < 10)
- {
- smaxcd = "0" + imaxcd ;
- }
- else
- {
- smaxcd = "" + imaxcd;
- }
-
- ds_main_codeinfo_codelist.addRow();
-
- var irow = ds_main_codeinfo_codelist.rowposition;
- ds_main_codeinfo_codelist.setColumn(irow, "harmcd", smaxcd);
- ds_main_codeinfo_codelist.setColumn(irow, "harmcls", ds_send_reqdata.getColumn(0, "harmcls"));
- ds_main_codeinfo_codelist.setColumn(irow, "useyn", "Y");
-
- }
- function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
- {
- var deptrow = ds_main_codeinfo_codelist.rowposition;
- var arrPostion = new Array();
- arrPostion[0] = deptrow;
- var status = ds_main_codeinfo_codelist.getRowType(arrPostion)
- if(status == 1)
- {
- grdf_setStatus(datagrid1, "D", arrPostion);
- }
- else if(status == 2)
- {
- ds_main_codeinfo_codelist.deleteRow(deptrow);
- }
- else if(status == 4)
- {
- ds_main_codeinfo_codelist.deleteRow(deptrow);
- }
- else if(status == 8)
- {
- grdf_setStatus(datagrid1, "", arrPostion);
- }
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- if(datacheck() == false)
- {
- return;
- }
- ExecData();
- }
- function datacheck()
- {
- for(var i = 0; i < ds_main_codeinfo_codelist.rowcount; i++)
- {
- if( utlf_isNull(ds_main_codeinfo_codelist.getColumn(i, "harmnm")))
- {
- sysf_messageBox("코드명은 필수 입력항목입니다.", "E999", "");
- return false;
- }
- }
- return true;
- }
- function ExecData()
- {
- var oParam = {};
- oParam.id = "TXRSM00801";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqExeSaveHarmcd";
- oParam.inds = "codelist=ds_main_codeinfo_codelist:U";
- oParam.outds = "ds_item=item";
- oParam.async = false;
- //oParam.callback = "cf_TXRSM00801";
- tranf_submit(oParam);
-
- grp_sea.btn_search.click();
- }
- function grp_sea_cmb_harmcls_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- fGetCodeList();
- }
- function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- fGetCodeList();
- }
- ]]></Script>
- </Form>
- </FDL>
|