123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMADB00500" position="absolute 0 0 1196 695" titletext="효능분류관리" oninit="SMADB00500_oninit" onload="SMADB00500_onload">
- <Layouts>
- <Layout>
- <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1137 2 1193 24" onclick="btn_save_onclick" anchor="top right"/>
- <Static id="caption19" text="효능분류관리" class="tit_1" position="absolute 0 0 106 25"/>
- <Div id="group2" taborder="2" style="align:center top;" class="div_SA" position="absolute 0 25 1193 65" anchor="left top right">
- <Layouts>
- <Layout>
- <Static id="caption2" text="코드 :" class="search_name" position="absolute 16 12 61 29" anchor="default"/>
- <Edit id="inp_codecd" taborder="1" class="input_search" position="absolute 65 10 195 31" onkeydown="group2_inp_codecd_onkeydown" anchor="default"/>
- <Static id="caption1" text="명칭 :" class="search_name" position="absolute 236 12 281 29" anchor="default"/>
- <Edit id="inp_codenm" taborder="2" class="input_search" position="absolute 285 10 705 31" onkeydown="group2_inp_codenm_onkeydown" anchor="default"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1117 9 1123 31" anchor="top right"/>
- <Button id="btn_sea" taborder="3" text="조회" class="btn1" position="absolute 1128 9 1184 31" onclick="group2_btn_sea_onclick" anchor="top right"/>
- </Layout>
- </Layouts>
- </Div>
- <Button id="button49" taborder="3" text="행삭제" onclick="group3_button49_onclick" class="btn2" position="absolute 1140 75 1193 97" anchor="top right"/>
- <Button id="button2" taborder="4" text="행추가" onclick="group3_button2_onclick" class="btn2" position="absolute 1030 75 1083 97" anchor="top right"/>
- <Button id="button50" taborder="5" text="행복사" onclick="group3_button50_onclick" class="btn2" position="absolute 1085 75 1138 97" anchor="top right"/>
- <Grid id="grd_efficacylist1" taborder="6" binddataset="ds_grd_efficacylist1" useinputpanel="false" autofittype="col" treeusecheckbox="false" treeuseimage="false" treeinitstatus="expand,null" position="absolute 0 99 1194 692" anchor="all" cellsizingtype="both" extendsizetype="row" autoenter="key" oncelldblclick="grd_efficacylist1_oncelldblclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="194"/>
- <Column size="776"/>
- <Column size="82"/>
- <Column size="96"/>
- </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="조회순서"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="tree" edittype="tree" text="bind:efcycd" editautoselect="true" treelevel="bind:efcylevel"/>
- <Cell col="2" displaytype="text" edittype="text" text="bind:efcynm" editautoselect="true"/>
- <Cell col="3" displaytype="normal" edittype="normal" editfilter="digit" text="bind:efcylevel" editlimit="5" editautoselect="true"/>
- <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:dispno" editautoselect="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grd_efficacylist1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="efcycd" type="STRING"/>
- <Column id="efcynm" type="STRING"/>
- <Column id="efcylevel" type="STRING"/>
- <Column id="dispno" type="STRING"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_searchdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="srchcomcd" type="STRING" size="256"/>
- <Column id="srchcomnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_temp_efficacylist1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-10-28
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-10-28 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- var arErrorCode = new HashArray();
- /******************************************************************
- * Argument :
- * Description : 초기화
- ******************************************************************/
- function SMADB00500_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMADB00500_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_setRowTypeIcon(grd_efficacylist1, 0);
-
- //권한관리
- btn_save.enable = frmf_checkAuth("X"); //저장
-
- grdf_initGrid(grd_efficacylist1);
- }
- /******************************************************************
- * Argument :
- * Description : 조회
- ******************************************************************/
- function group2_btn_sea_onclick(obj:Button, e:ClickEventInfo)
- {
- var getCode = group2.inp_codecd.text;
- var getCdnm = group2.inp_codenm.text;
-
- ds_send_searchdata.setColumn(0, "srchcomcd", getCode);
- ds_send_searchdata.setColumn(0, "srchcomnm", getCdnm);
-
- var oParam = {};
- oParam.id = "TRADB00501";
- oParam.service = "pharmacybaseapp.EfficacyCode";
- oParam.method = "reqGetEfficacyList";
- oParam.inds = "req=ds_send_searchdata";
- oParam.outds = "ds_grd_efficacylist1=item";
- oParam.async = false;
- //oParam.callback = "cf_TRADB00501";
- tranf_submit(oParam);
-
- ds_temp_efficacylist1.copyData(ds_grd_efficacylist1);
- }
- // 코드 입력 후 Enter
- function group2_inp_codecd_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if( e.keycode == 13 ){
- group2_btn_sea_onclick();
- }
- }
- //명칭 입력 후 Enter
- function group2_inp_codenm_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if( e.keycode == 13 ){
- group2_btn_sea_onclick();
- }
- }
- /******************************************************************
- * Argument :
- * Description : 행추가
- ******************************************************************/
- function group3_button2_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_grd_efficacylist1.insertRow(ds_grd_efficacylist1.rowposition + 1);
- }
- /******************************************************************
- * Argument :
- * Description : 행복사
- ******************************************************************/
- function group3_button50_onclick(obj:Button, e:ClickEventInfo)
- {
- var addRow = ds_grd_efficacylist1.insertRow( ds_grd_efficacylist1.rowposition + 1 );
- ds_grd_efficacylist1.copyRow(addRow, ds_grd_efficacylist1, ds_grd_efficacylist1.rowposition - 1);
- }
- /******************************************************************
- * Argument :
- * Description : 행삭제
- ******************************************************************/
- function group3_button49_onclick(obj:Button, e:ClickEventInfo)
- {
- var cRow = ds_grd_efficacylist1.rowposition;
- if( ds_grd_efficacylist1.getRowType(cRow) == 2 ){
- ds_grd_efficacylist1.deleteRow(cRow);
- } else {
- grdf_setStatus(grd_efficacylist1, "D", grdf_getSelectedRows(grd_efficacylist1));
- }
- }
- /******************************************************************
- * Argument :
- * Description : 저장
- ******************************************************************/
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var oDsUpdate = grdf_getGridUpdateData(grd_efficacylist1);
-
- if( oDsUpdate.rowcount < 1 ){
- sysf_messageBox("입력","E013");
- return;
- }
-
- grdf_setStatusColumn(oDsUpdate, "m"); // 각행의 status에 rowType 값에 따라 'i', 'u', 'd'로 업데이트 시켜준다
- ds_send_req.copyData(oDsUpdate, true);
-
- for( var i = 0; i < ds_send_req.rowcount; i++ ){
- // 코드 null check
- if( utlf_isNull(ds_send_req.getColumn(i, "efcycd")) ){
- sysf_messageBox("코드는 ","I003");
- return;
- } else {
- // 동일코드 check
- if( ds_send_req.getColumn(i, "m") == "i" ){
- for( var j = 0; j < ds_temp_efficacylist1.rowcount; j++ ){
- var tMthdcd = ds_temp_efficacylist1.getColumn(j, "efcycd");
- var sMthdcd = ds_send_req.getColumn(i, "efcycd");
- if( tMthdcd == sMthdcd ){
- sysf_messageBox("동일한 코드가 존재합니다.","I");
- return;
- }
- }
- }
- }
- // 효능분류명 null check
- if( utlf_isNull(ds_send_req.getColumn(i, "efcynm")) ){
- sysf_messageBox("효능분류명은 ","I003");
- return;
- }
- // 레벨 null check
- if( utlf_isNull(ds_send_req.getColumn(i, "efcylevel")) ){
- sysf_messageBox("레벨은 ","I003");
- return;
- }
- }
- //efcylevel string을 int로 변경
- dsf_setTypeFormat(ds_send_req, "efcylevel:INT");
- ds_temp_efficacylist1.clearData();
- var oParam = {};
- oParam.id = "TXADB00501";
- oParam.service = "pharmacybaseapp.EfficacyCode";
- oParam.method = "reqExeEfficacyCode";
- oParam.inds = "efcy1=ds_send_req";
- oParam.outds = "ds_temp_efficacylist1=item";
- oParam.async = false;
- oParam.callback = "cf_TXADB00501";
- tranf_submit(oParam);
- //조회
- var oParam = {};
- oParam.id = "TRADB00501";
- oParam.service = "pharmacybaseapp.EfficacyCode";
- oParam.method = "reqGetEfficacyList";
- oParam.inds = "req=ds_send_searchdata";
- oParam.outds = "ds_grd_efficacylist1=item";
- oParam.async = false;
- //oParam.callback = "cf_TRADB00501";
- tranf_submit(oParam);
- ds_temp_efficacylist1.copyData(ds_grd_efficacylist1);
- }
- function cf_TXADB00501(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function grd_efficacylist1_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- //*var colNom = grd_efficacylist1.currentcol;
- //if( e.col != "1" ){
- // return;
- //}
-
- //var cRow = ds_grd_efficacylist1.rowposition;
- //sysf_messageBox(cRow);
- //var comCd = ds_grd_efficacylist1.getColumn(cRow, "efcycd");
- //var comNm = ds_grd_efficacylist1.getColumn(cRow, "efcynm");
- // var comExcd = ds_grd_efficacylist1.getColumn(cRow, "comexcd");
- //var drugCdcnt = ds_grd_efficacylist1.getColumn(cRow, "dispno");
- //sysf_messageBox(comCd);
- //if( utlf_isNull(comCd) ) return;
-
- //ds_send_searchdata.setColumn(0, "srchcomcd", comCd); //성분코드
- // ds_send_searchdata.setColumn(0, "srchcomexcd", comExcd); //확장코드
- //ds_send_searchdata.setColumn(0, "srchcomnm", comNm); //성분명칭
-
- //var oParam = {};
- // oParam.id = "TRADB00501";
- // oParam.service = "pharmacybaseapp.EfficacyCode";
- // oParam.method = "reqGetEfficacyList";
- // oParam.inds = "req=ds_send_searchdata";
- // oParam.outds = "ds_grd_efficacylist1=item";
- // oParam.async = false;
- // //oParam.callback = "cf_TRADB00202";
- //
- //tranf_submit(oParam);
-
- //switch1.visible = true;
-
- }
- ]]></Script>
- </Form>
- </FDL>
|