123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMADB00300" position="absolute 0 0 1196 684" titletext="병용금기 관리" oninit="SMADB00300_oninit" onload="SMADB00300_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 116 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/>
- </Layouts>
- </Div>
- <Static id="caption3" text="성분코드 :" class="search_name" position="absolute 21 37 92 54"/>
- <Edit id="inp_comcd" taborder="3" class="input_search" position="absolute 95 34 225 55" onkeydown="inp_comcd_onkeydown"/>
- <Static id="caption1" text="성분명칭 :" class="search_name" position="absolute 259 37 330 54"/>
- <Edit id="inp_comnm" taborder="4" class="input_search" position="absolute 333 35 698 56" onkeydown="inp_comnm_onkeydown"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1100 34 1106 56" anchor="top right"/>
- <Button id="btn_search" taborder="5" text="조회" class="btn1" position="absolute 1118 34 1176 56" onclick="btn_search_onclick" anchor="top right"/>
- <Grid id="grd_datagrid1" taborder="6" binddataset="ds_grd_datagrid1" autoenter="key" useinputpanel="false" autofittype="col" onexpanddown="group3_grd_datagrid1_onexpanddown" position="absolute 0 95 1194 681" anchor="all" cellsizingtype="both" extendsizetype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="100"/>
- <Column size="62"/>
- <Column size="145"/>
- <Column size="100"/>
- <Column size="60"/>
- <Column size="145"/>
- <Column size="93"/>
- <Column size="93"/>
- <Column size="310"/>
- </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="성분명칭"/>
- <Cell col="7" text="시작일자"/>
- <Cell col="8" text="종료일자"/>
- <Cell col="9" text="설명"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="text" edittype="text" style="padding:0 0 0 5;" text="bind:comcd1" editautoselect="true" expandshow="show"/>
- <Cell col="2" style="padding:0 0 0 5;" text="bind:comexcd1"/>
- <Cell col="3" style="padding:0 0 0 5;" text="bind:comnm1"/>
- <Cell col="4" displaytype="text" edittype="text" style="padding:0 0 0 5;" text="bind:comcd2" editautoselect="true" expandshow="show"/>
- <Cell col="5" style="padding:0 0 0 5;" text="bind:comexcd2"/>
- <Cell col="6" style="align:left middle;padding:0 0 0 5;" text="bind:comnm2"/>
- <Cell col="7" displaytype="date" edittype="date" text="bind:fromdd"/>
- <Cell col="8" displaytype="date" edittype="date" text="bind:todd"/>
- <Cell col="9" displaytype="text" edittype="text" style="padding:0 0 0 5;" text="bind:tboocnts" editautoselect="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_grdadd" taborder="7" text="행추가" onclick="btn_grdadd_onclick" class="btn2" position="absolute 1030 71 1083 93" anchor="top right"/>
- <Button id="btn_rowcopy" taborder="8" text="행복사" onclick="btn_rowcopy_onclick" class="btn2" position="absolute 1085 71 1138 93" anchor="top right"/>
- <Button id="btn_grddel" taborder="9" text="행삭제" onclick="btn_grddel_onclick" class="btn2" position="absolute 1140 71 1193 93" anchor="top right"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grd_datagrid1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="comcd1" type="STRING"/>
- <Column id="comexcd1" type="STRING"/>
- <Column id="comnm1" type="STRING"/>
- <Column id="comcd2" type="STRING"/>
- <Column id="comexcd2" type="STRING"/>
- <Column id="comnm2" type="STRING"/>
- <Column id="fromdd" type="STRING"/>
- <Column id="todd" type="STRING"/>
- <Column id="tboocnts" 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="comcd" type="STRING" size="256"/>
- <Column id="comnm" 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_datagrid1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_hidden_receiveref" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="srchtype" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="srchtype">B</Col>
- </Row>
- </Rows>
- </Dataset>
- </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 SMADB00300_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMADB00300_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_setRowTypeIcon(grd_datagrid1, 0);
-
- //권한관리
- btn_save.enable = frmf_checkAuth("X"); //저장
-
- grdf_initGrid(grd_datagrid1);
- }
- /******************************************************************
- * Argument :
- * Description : 조회
- ******************************************************************/
- function btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- var getCode = "";
- var getCdnm = "";
- if( !utlf_isNull( inp_comcd.text) ) getCode = inp_comcd.text +"%";
- if( !utlf_isNull( inp_comnm.text) ) getCdnm = inp_comnm.text +"%";
- ds_send_searchdata.setColumn(0, "comcd", getCode);
- ds_send_searchdata.setColumn(0, "comnm", getCdnm);
-
- var oParam = {};
- oParam.id = "TRADB00301";
- oParam.service = "pharmacybaseapp.ComTboo";
- oParam.method = "reqGetComTboo";
- oParam.inds = "req=ds_send_searchdata";
- oParam.outds = "ds_grd_datagrid1=item";
- oParam.async = false;
- //oParam.callback = "cf_TRADB00301";
- tranf_submit(oParam);
- ds_temp_datagrid1.copyData(ds_grd_datagrid1);
- }
- // 성분코드 Enter
- function inp_comcd_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if( e.keycode == 13 ){
- btn_search_onclick();
- }
- }
- //성분명칭 Enter
- function inp_comnm_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if( e.keycode == 13 ){
- btn_search_onclick();
- }
- }
- /******************************************************************
- * Argument :
- * Description : 행추가
- ******************************************************************/
- function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
- {
- var nRow = ds_grd_datagrid1.addRow();
- ds_grd_datagrid1.setColumn(nRow, "todd", "99991231");
- }
- /******************************************************************
- * Argument :
- * Description : 행복사
- ******************************************************************/
- function btn_rowcopy_onclick(obj:Button, e:ClickEventInfo)
- {
- var addRow = ds_grd_datagrid1.insertRow( ds_grd_datagrid1.rowposition + 1 );
- ds_grd_datagrid1.copyRow(addRow, ds_grd_datagrid1, ds_grd_datagrid1.rowposition - 1);
- ds_grd_datagrid1.setColumn(grd_datagrid1.currentrow, "todd", "99991231");
- }
- /******************************************************************
- * Argument :
- * Description : 행삭제
- ******************************************************************/
- function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
- {
- var cRow = ds_grd_datagrid1.rowposition;
- if( ds_grd_datagrid1.getRowType(cRow) == 2 ){
- ds_grd_datagrid1.deleteRow(cRow);
- } else {
- grdf_setStatus(grd_datagrid1, "D", grdf_getSelectedRows(grd_datagrid1));
- }
- }
- /******************************************************************
- * Argument :
- * Description : 코드Button
- ******************************************************************/
- function group3_grd_datagrid1_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- var cCol = grd_datagrid1.currentcol;
- var cRow = grd_datagrid1.currentrow;
- if( cCol == "1" || cCol == "4" ){
- frmf_setParameter("srchtype", "B");
- frmf_modal("SPADB61300", "SPADB61300", null, null, null, null, null, null, null, null, null, null, "M");
-
- if( cCol == "1" ){
- ds_grd_datagrid1.setColumn(cRow, "comcd1", frmf_getParameter("comcd"));
- ds_grd_datagrid1.setColumn(cRow, "comexcd1", frmf_getParameter("comexcd"));
- ds_grd_datagrid1.setColumn(cRow, "comnm1", frmf_getParameter("comnm"));
- } else {
- ds_grd_datagrid1.setColumn(cRow, "comcd2", frmf_getParameter("comcd"));
- ds_grd_datagrid1.setColumn(cRow, "comexcd2", frmf_getParameter("comexcd"));
- ds_grd_datagrid1.setColumn(cRow, "comnm2", frmf_getParameter("comnm"));
- }
- obj.showEditor(false);
- }
- }
- /******************************************************************
- * Argument :
- * Description : 저장
- ******************************************************************/
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- if( sysf_messageBox("병용금기", "Q002") != 6 ){
- return;
- }
- var oDsUpdate = grdf_getGridUpdateData(grd_datagrid1);
- 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, "comcd1")) || utlf_isNull(ds_send_req.getColumn(i, "comcd2")) ){
- sysf_messageBox("성분코드는 ","I003");
- return;
- } else {
- // 동일코드 check
- if( ds_send_req.getColumn(i, "m") == "i" ){
- for( var j = 0; j < ds_temp_datagrid1.rowcount; j++ ){
- var tMthdcd = ds_temp_datagrid1.getColumn(j, "comcd2");
- var sMthdcd = ds_send_req.getColumn(i, "comcd2");
- if( tMthdcd == sMthdcd ){
- sysf_messageBox("동일한 코드가 존재합니다.","I");
- return;
- }
- }
- }
- }
- // 확장코드 null check
- if( utlf_isNull(ds_send_req.getColumn(i, "comexcd1")) || utlf_isNull(ds_send_req.getColumn(i, "comexcd1")) ){
- sysf_messageBox("확장코드는 ","I003");
- return;
- }
- // 시작일자 null check
- if( utlf_isNull(ds_send_req.getColumn(i, "fromdd")) ){
- sysf_messageBox("시작일자는 ","I003");
- return;
- }
- // 종료일자 null check
- if( utlf_isNull(ds_send_req.getColumn(i, "todd")) ){
- sysf_messageBox("종료일자는 ","I003");
- return;
- }
- }
-
- dsf_setDefaultVal(ds_send_req, "tboocnts:-");
- ds_temp_datagrid1.clearData();
- var oParam = {};
- oParam.id = "TXADB00301";
- oParam.service = "pharmacybaseapp.ComTboo";
- oParam.method = "reqExeComTboo";
- oParam.inds = "req=ds_send_req";
- oParam.outds = "ds_temp_datagrid1=item";
- oParam.async = false;
- oParam.callback = "cf_TXADB00301";
- tranf_submit(oParam);
-
- //조회
- var oParam = {};
- oParam.id = "TRADB00301";
- oParam.service = "pharmacybaseapp.ComTboo";
- oParam.method = "reqGetComTboo";
- oParam.inds = "req=ds_send_searchdata";
- oParam.outds = "ds_grd_datagrid1=item";
- oParam.async = false;
- //oParam.callback = "cf_TRADB00301";
- tranf_submit(oParam);
- ds_temp_datagrid1.copyData(ds_grd_datagrid1);
- }
- function cf_TXADB00301(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- ]]></Script>
- </Form>
- </FDL>
|