123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMNP07000" position="absolute 0 0 800 550" titletext="선납재료 물품업체 관리" oninit="SPMNP07000_oninit" onload="SPMNP07000_onload">
- <Layouts>
- <Layout>
- <Static text="선납재료 물품업체 관리" position="absolute 0 0 167 25" id="caption6" class="tit_1"/>
- <Static text="물품업체 목록" position="absolute 0 32 108 48" id="caption20" class="tit_2"/>
- <Button position="absolute 631 28 684 48" id="button8" class="btn2" text="행추가" onclick="button8_onclick" anchor="top right"/>
- <Button position="absolute 686 28 739 48" id="button9" class="btn2" text="행삭제" onclick="button9_onclick" anchor="top right"/>
- <Grid position="absolute 0 50 800 550" id="grd_equiplist" visible="true" binddataset="ds_main_codelist" autoenter="key" cellsizingtype="col" anchor="all" selecttype="multirow" autofittype="col" oncellclick="grd_equiplist_oncellclick" onexpandup="grd_equiplist_onexpandup">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25"/>
- <Column size="40"/>
- <Column size="70"/>
- <Column size="247"/>
- <Column size="205"/>
- <Column size="172"/>
- <Column size="0"/>
- <Column size="7"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="23"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="순번"/>
- <Cell col="2" text="업체코드"/>
- <Cell col="3" displaytype="normal" text="거래처명"/>
- <Cell col="4" text="연락처"/>
- <Cell col="5" text="E-Mail"/>
- <Cell col="6" text="순서"/>
- <Cell col="7" text="유효시작일"/>
- <Cell col="8" text="유효종료일"/>
- <Cell col="9" text="최종 변경자"/>
- <Cell col="10" text="최종 변경일"/>
- <Cell col="11" text="lastupdtrid"/>
- <Cell col="12" text="cdgrupid"/>
- <Cell col="13" text="supcdid"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" edittype="expr:expr:getRowType(currow) == 2 ? 'text' : ''" expr="currow + 1"/>
- <Cell col="2" edittype="expr:expr:getRowType(currow) == 2 ? 'text' : ''" text="bind:cdid"/>
- <Cell col="3" displaytype="text" style="padding:0 0 0 3;" text="bind:custnm" expandshow="expr:getRowType(currow) == 2 ? 'show' : 'hide'"/>
- <Cell col="4" displaytype="text" edittype="text" text="bind:cdnm"/>
- <Cell col="5" displaytype="text" edittype="text" text="bind:grupdetldesc"/>
- <Cell col="6" displaytype="text" edittype="text" text="bind:sortseq"/>
- <Cell col="7" displaytype="date" text="bind:valifromdd" calendardisplaynulltype="none"/>
- <Cell col="8" displaytype="date" edittype="date" text="bind:valitodd" calendardisplaynulltype="none"/>
- <Cell col="9" text="bind:lastupdtrnm"/>
- <Cell col="10" text="bind:lastupdtdt" mask="yyyy-mm-dd"/>
- <Cell col="11" text="bind:lastupdtrid"/>
- <Cell col="12" text="bind:cdgrupid"/>
- <Cell col="13" text="bind:supcdid"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 744 28 800 48" id="button2" class="btn4" text="저장" onclick="button2_onclick" anchor="top right"/>
- <Button position="absolute 744 0 800 22" id="btn_search" class="btn1" text="조회" onclick="btn_search_onclick" anchor="top right" visible="false"/>
- <Button id="btn_excel" taborder="1" text="Excel" onclick="btn_excel_onclick" class="btn7" position="absolute 566 28 629 48" anchor="top right"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" oncolumnchanged="ds_main_codelist_oncolumnchanged">
- <ColumnInfo>
- <Column id="cdid" type="STRING"/>
- <Column id="cdnm" type="STRING"/>
- <Column id="grupdetldesc" type="STRING"/>
- <Column id="sortseq" type="STRING"/>
- <Column id="supcdid" type="STRING"/>
- <Column id="valifromdd" type="STRING"/>
- <Column id="valitodd" type="STRING"/>
- <Column id="lastupdtrnm" type="STRING"/>
- <Column id="lastupdtdt" type="STRING"/>
- <Column id="lastupdtrid" type="STRING"/>
- <Column id="cdgrupid" type="STRING"/>
- <Column id="custnm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_temp_equiplist_equipinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="equipnm" type="STRING"/>
- <Column id="equipnm" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdgrupid" type="STRING" size="256" sumtext="cdgrupid"/>
- <Column id="oproomcd" type="STRING" size="256" sumtext="oproomcd"/>
- <Column id="sendflag" type="STRING" size="256"/>
- <Column id="equipnmsrc" type="STRING" size="256"/>
- <Column id="equipnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_installplcelist_installplceinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="oproomcd" type="STRING" size="256" sumtext="수술방 코드"/>
- <Column id="oproomnm" type="STRING" size="256" sumtext="수술방 이름"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_listdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="status" type="STRING" size="256" sumtext="상태값"/>
- <Column id="cdnm" type="STRING" size="256" sumtext="장비 명"/>
- <Column id="grupdetldesc" type="STRING" size="256" sumtext="모델"/>
- <Column id="sortseq" type="STRING" size="256" sumtext="순서"/>
- <Column id="supcdid" type="STRING" size="256" sumtext="수술방코드"/>
- <Column id="cdgrupid" type="STRING" size="256" sumtext="cdgrupid"/>
- <Column id="cdid" type="STRING" size="256" sumtext="cdid"/>
- <Column id="valifromdd" type="STRING" size="256" sumtext="유효시작일자"/>
- <Column id="valitodd" type="STRING" size="256" sumtext="유종료일자"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="equipnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_data_custlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="custcd" type="STRING" size="256" sumtext="회사코드"/>
- <Column id="custnm" type="STRING" size="256" sumtext="회사명"/>
- <Column id="custtel" type="STRING" size="256" sumtext="회사전화번호"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : 경대 의료정보시스템
- * Job Name : emr_opanstxp -> SPMNP00361
- * Creator : yjh
- * Make Date : 2016-07-21
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2016-07-21 yjh TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- function fInitialize(){
- grdf_setRowTypeIcon(grd_equiplist, 0);
- grdf_setGridSort(grd_equiplist);
- grdf_setToolTipBind(grd_equiplist);
-
- dsf_createDsRow("ds_cond_TRMNP04411", [{col:"refflag", type:"STRING", size:256, val:1}
- , {col:"refnm", type:"STRING", size:256, val:""}]);
-
- var oParam = {};
- oParam.id = "TRMNP04411";
- oParam.service = "opanstapp.OpAnstStocMngt";
- oParam.method = "reqGetProdCmpyInfo";
- oParam.inds = "reqdata=ds_cond_TRMNP04411";
- oParam.outds = "ds_data_custlist=custlist";
- oParam.async = false;
- tranf_submit(oParam);
-
- ds_send.setColumn(0, "cdgrupid", "U44");
-
- ds_main_codelist.enableevent = false;
-
- var oParam = {};
- oParam.id = "TRMNW20000";
- oParam.service = "wardcareapp.WardCareRec";
- oParam.method = "reqGetMHardCodeList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_codelist=codelist";
- oParam.async = false;
- oParam.callback = "cf_TRMNW20000";
- tranf_submit(oParam);
-
- ds_main_codelist.enableevent = true;
- }
- function cf_TRMNW20000(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- ds_main_codelist.enableevent = false;
- ds_main_codelist.addColumn("custnm", "string");
- var nCnt = ds_main_codelist.rowcount;
- for( var i=0; i<nCnt; i++ ){
- var sCdid = ds_main_codelist.getColumn(i, "cdid");
- if( !utlf_isNull(sCdid) ){
- var nFindRow = ds_data_custlist.findRow("custcd", sCdid);
- var sCustnm = "";
- if( nFindRow > -1 ){
- sCustnm = utlf_transNullToEmpty(ds_data_custlist.getColumn(nFindRow, "custnm"));
- }
- ds_main_codelist.setColumn(i, "custnm", sCustnm);
- }
- }
- ds_main_codelist.enableevent = true;
- ds_main_codelist.applyChange();
-
- ds_main_codelist.keystring = "";
- ds_main_codelist.keystring = "S:+sortseq";
- ds_main_codelist.rowposition = 0;
- ds_main_codelist.rowposition = -1;
- }
- function fClickRowAddBtn(){
-
- var nRow = ds_main_codelist.addRow(); // 입력할 행 추가.
- ds_main_codelist.setColumn(nRow, "cdgrupid", "U44");
- ds_main_codelist.setColumn(nRow, "valifromdd", "19000101");
- ds_main_codelist.setColumn(nRow, "valitodd", "99991231");
- var nMaxSeq = ds_main_codelist.getMax('parseInt(sortseq)')+1;
- ds_main_codelist.setColumn(nRow, "sortseq", nMaxSeq);
- ds_main_codelist.setColumn(nRow, "supcdid", '-');
- grd_equiplist.setCellPos(2);
- grd_equiplist.showEditor(true);
- }
- function fClickDeleteBtn(){
- var nRow = ds_main_codelist.rowposition;
- var iStatus = ds_main_codelist.getRowType(nRow);
- if(nRow < 0) {
- alert("삭제할 행을 선택해주세요.");
- return;
- }
- if (iStatus == 2) {
- ds_main_codelist.deleteRow(nRow);
- } else {
- grdf_setStatus(grd_equiplist, "D", [nRow]);
- }
-
- }
- function fOnClickSaveBtn(){
- // step1. 불필요 항목 정리
- for( var i=ds_main_codelist.rowcount-1; i>=0; i-- ){
- var nCdid = ds_main_codelist.getColumn(i, "cdid");
- if( utlf_isNull(nCdid) ){
- ds_main_codelist.deleteRow(i);
- continue;
- }
- var nRowType = ds_main_codelist.getRowType(i);
- if( nRowType == 2 ){
-
- var nDupCnt = ds_main_codelist.getCaseCount("cdid=='"+nCdid+"' && valitodd == '99991231'");
- if( nDupCnt > 1 ){
- sysf_messageBox("업체코드( " + nCdid + " ) 가 중복입니다.", "E");
- return;
- }
- }
- }
-
-
-
- var oParam = {};
- oParam.id = "TXMNW20000";
- oParam.service = "wardcareapp.WardCareRec";
- oParam.method = "reqExeSaveMHardCodeList";
- oParam.inds = "codelist=ds_main_codelist:U";
- oParam.outds = "ds_main_codelist=chklist";
- oParam.typeStr = "status";
- oParam.async = false;
- oParam.callback = "cf_TXMNW20000";
- tranf_submit(oParam);
- btn_search.click();
- }
- function cf_TXMNW20000(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SPMNP07000
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시
- ****************************************************************************************/
- function SPMNP07000_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SPMNP07000
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 로딩 완료시
- ****************************************************************************************/
- function SPMNP07000_onload(obj:Form, e:LoadEventInfo)
- {
- fInitialize();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : button8
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 행추가버튼 클릭시
- ****************************************************************************************/
- function button8_onclick(obj:Button, e:ClickEventInfo)
- {
- fClickRowAddBtn();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : button9
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 행삭제버튼 클릭시
- ****************************************************************************************/
- function button9_onclick(obj:Button, e:ClickEventInfo)
- {
- fClickDeleteBtn();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : button2
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 저장버튼 클릭시
- ****************************************************************************************/
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- fOnClickSaveBtn();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_search
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 조회버튼 클릭시
- ****************************************************************************************/
- function btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- fInitialize();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_eqip
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 조회버튼 클릭시
- ****************************************************************************************/
- function btn_eqip_onclick(obj:Button, e:ClickEventInfo)
- {
- var equipnmsrc = ds_hidden.getColumn(0, "equipnm");
- ds_send.setColumn(0, "equipnmsrc", equipnmsrc);
-
- var oParam = {};
- oParam.id = "TRMNP00371";
- oParam.service = "opanstapp.OpAnstRec";
- oParam.method = "reqGetOpRecEquiplist";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_temp_equiplist_equipinfo=equipinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRMNP00371";
- tranf_submit(oParam);
-
- ds_hidden.setColumn(0, "equipnm", "");
- }
- function grd_equiplist_onexpandup(obj:Grid, e)
- {
- if( e.col == 3 ){
- frmf_setParameter("SendData", "");
-
- frmf_modal("SMMNP04410", "SMMNP04410", null, null, null, null, null, null, null, null, null, null, "M");
-
- var getData = frmf_getParameter("SendData");
- if( utlf_isNull(getData)) {
- return;
- }else {
- var getDataTemp = getData.split("|");
- var grdDs = this.objects[obj.binddataset];
- var nRow = grdDs.rowposition;
- grdDs.setColumn(e.row, "cdid", getDataTemp[0]);
- //grdDs.setColumn(e.row, "custcd", getDataTemp[0]);
- //grdDs.setColumn(e.row, "cdnm", getDataTemp[2]);
- }
- }
- }
- function grd_equiplist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- // if( obj.getCellProperty("body", e.col, "expandshow") != "show"
- // || (obj.getCellProperty("body", e.col, "edittype") != "text" && obj.getCellProperty("body", e.col, "edittype").indexOf("expr") < 0)) return;
-
- if( ds_main_codelist.getRowType(e.row) != 2 ) return;
-
- var oRect = obj.getCellRect(e.row, e.col);
- if( !utlf_isNull(oRect) ){
- rSize = oRect.right;
- if (e.clientX >= (rSize - 25) && e.clientX < rSize){
- var userEvent = new EventInfo();
- userEvent.col = e.col;
- userEvent.row = e.row;
-
- grd_equiplist_onexpandup(obj, userEvent);
- }
- }
- }
- function ds_main_codelist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if( e.columnid == "cdid" ){
- //obj.setColumn(e.row, "custcd", e.newvalue);
-
- var nFindRow = ds_data_custlist.findRow("custcd", e.newvalue);
- var sCustnm = "";
- if( nFindRow > -1 ){
- sCustnm = utlf_transNullToEmpty(ds_data_custlist.getColumn(nFindRow, "custnm"));
- }
- obj.setColumn(e.row, "custnm", sCustnm);
- }
- }
- function btn_excel_onclick(obj:Button, e:ClickEventInfo)
- {
- grdf_exportExcel(grd_equiplist, "선납재료물품업체관리", "Sheet", true);
- }
- ]]></Script>
- </Form>
- </FDL>
|