123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMMO21900" position="absolute 0 0 713 326" titletext="미처방 사유 선택" oninit="SPMMO21900_oninit" onload="SPMMO21900_onload">
- <Layouts>
- <Layout>
- <Button position="absolute 549 306 629 326" id="btn_save" class="btn4" text="계속저장" onclick="btn_save_onclick"/>
- <Static text="미처방 사유 선택" position="absolute 0 0 302 20" id="caption1" class="tit_2"/>
- <Shape position="absolute 3 17 710 18" linetype="vertical" id="line7" class="line_1"/>
- <Static text="* 누락된 처방이 있습니다. 저장하시겠습니까 ?" position="absolute 285 307 545 327" id="caption2" style="color:red;"/>
- <Button position="absolute 633 306 713 326" id="button2" class="btn3" text="처방취소" onclick="button2_onclick"/>
- <Grid position="absolute 0 21 713 299" id="grd_resnlist" binddataset="ds_grd_resnlist" oncellclick="grd_resnlist_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="30"/>
- <Column size="50"/>
- <Column size="403"/>
- <Column size="202"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="선택"/>
- <Cell col="1" text="코드"/>
- <Cell col="2" text="사유"/>
- <Cell col="3" text="상세사유"/>
- </Band>
- <Band id="body">
- <Cell displaytype="checkbox" edittype="checkbox" text="bind:status" expr="expr:(status == "Y" || status == 1) ? 1 : 0"/>
- <Cell col="1" text="bind:hardcd"/>
- <Cell col="2" style="align:left middle;" text="bind:hardcdnm"/>
- <Cell col="3" displaytype="text" edittype="text" text="bind:resncmt" editimemode="hangul" editautoselect="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_hardcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_hardcd_oncolumnchanged">
- <ColumnInfo>
- <Column id="status" type="STRING" size="256" sumtext="상태값"/>
- <Column id="hardcd" type="STRING" size="256" sumtext="하드코드"/>
- <Column id="hardcdnm" type="STRING" size="256" sumtext="하드코드명"/>
- <Column id="resncmt" type="STRING" size="256" sumtext="상세사유"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="selcond1" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="selcond1">1</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2014-12-10
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-12-10 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- function SPMMO21900_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SPMMO21900_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_setToolTipBind(grd_resnlist);
-
- caption1.text = opener.frmf_getParameter("SPMMO21900_title");
- ds_send.setColumn(0, "hardcd", opener.frmf_getParameter("SPMMO21900_hardcdno"));
-
- var oParam = {};
- oParam.id = "TRMMB16401";
- oParam.service = "prcpbaseapp.EnvInfoMngt";
- oParam.method = "reqGetHardCodeCD";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_hardcd=hardcd";
- oParam.async = true;
- oParam.callback = "cf_TRMMB16401";
- tranf_submit(oParam);
- }
- function cf_TRMMB16401(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- dsf_setDefaultVal(ds_hardcd, "status:N");
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var sSelHardCd = "";
- var sSelResnCmt = "";
-
- var oSelNode = ds_hardcd.getCaseCount("status == 'Y'");
- if( oSelNode == 1 ) {
- var findRow = ds_hardcd.findRow("status", "Y");
-
- sSelHardCd = ds_hardcd.getColumn(findRow, "hardcd");
-
- if (sSelHardCd == "999") { // 기타 선택시
- if (ds_hardcd.getColumn(findRow, "resncmt") == "") {
- sysf_messageBox ( "기타사유 선택시 상세사유을 입력", "I008" );
- return;
- }
-
- sSelResnCmt = ds_hardcd.getColumn(findRow, "hardcdnm") + ":" + ds_hardcd.getColumn(findRow, "resncmt");
- } else {
- sSelResnCmt = ds_hardcd.getColumn(findRow, "hardcdnm");
- }
- opener.frmf_setParameter ( "SPMMO21900_resncode", sSelHardCd );
- opener.frmf_setParameter ( "SPMMO21900_resncmt", sSelResnCmt );
- } else {
- sysf_messageBox ( "미처방 사유는 하나만 선택", "I006" );
- return;
- }
- opener.frmf_setParameter ( "SPMMO21900_rtn1", "Y" );
- close();
- }
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- opener.frmf_setParameter ( "SPMMO21900_rtn1", "N" );
- close();
- }
- function grd_resnlist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if(e.row < 0 || e.col < 0) return;
-
- var currow = e.row;
-
- if (e.col != obj.getBindCellIndex("body", "status")) {
- if ( ds_hardcd.getColumn(currow, "status") == "Y" ) {
- ds_hardcd.setColumn(currow, "status", "N");
- } else {
- ds_hardcd.setColumn(currow, "status", "Y");
- }
- }
-
- // 기타 선택시만 상세 내용 입력 하도록
- if (obj.getBindCellIndex("body", "resncmt") != -1 && ds_hardcd.getColumn(currow, "hardcd") == "999"){
- if ( ds_hardcd.getColumn(currow, "status") == "Y" ) {
- obj.setCellPos(obj.getBindCellIndex("body", "resncmt"));
- obj.showEditor(true);
- } else {
- ds_hardcd.setColumn(currow, "resncmt", "");
- }
- }
- }
- function ds_hardcd_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- // 그리드안의 checkbox 값 변경 용도
- if(e.columnid == "status") {
- obj.setColumn(e.row, e.columnid, (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
- }
- }]]></Script>
- </Form>
- </FDL>
|