123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMMNP02200" position="absolute 0 0 840 540" titletext="거래처 기준자료" onload="SMMNP02200_onload" ontimer="SMMNP02200_ontimer">
- <Layouts>
- <Layout>
- <Shape position="absolute 3 31 833 37" linetype="horizontal" id="line1" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
- <Grid position="absolute 3 35 833 535" id="grd_custlist" class="datagrid2" binddataset="ds_main_custlist" oncellclick="grd_custlist_oncellclick" oncloseup="grd_custlist_oncloseup" onlbuttonup="grd_custlist_onlbuttonup" autoenter="key" cellsizingtype="both" extendsizetype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="80"/>
- <Column size="120"/>
- <Column size="70"/>
- <Column size="151"/>
- <Column size="185"/>
- <Column size="60"/>
- <Column size="115"/>
- <Column size="0"/>
- <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="담당직원"/>
- <Cell col="7" text="담당자전화"/>
- <Cell col="8" text="MEMO"/>
- <Cell col="9" text="이력번호"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="bind:status"/>
- <Cell col="1" style="align:center middle;" text="bind:custcd"/>
- <Cell col="2" style="align:center middle;" text="bind:custnm"/>
- <Cell col="3" displaytype="combo" edittype="combo" style="align:center middle;" text="bind:custdeptcd" combodataset="ds_init_deptlist" combocodecol="deptcd" combodatacol="depthngnm" combodisplayrowcount="-1"/>
- <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:custtel"/>
- <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" text="bind:custmail"/>
- <Cell col="6" displaytype="text" edittype="text" style="align:center middle;" text="bind:chargenm"/>
- <Cell col="7" displaytype="text" edittype="text" style="align:center middle;" text="bind:chargetel"/>
- <Cell col="8" displaytype="combo" edittype="combo" text="bind:memo"/>
- <Cell col="9" text="bind:histno"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static text="거래처 기준자료" position="absolute 3 14 124 30" id="caption1" class="tit_2"/>
- <Button position="absolute 629 11 704 30" id="button4" class="btn2" text="거래처추가" onclick="button4_onclick"/>
- <Button position="absolute 787 11 829 30" id="button1" class="btn5" text="저장" onclick="button1_onclick"/>
- <Button position="absolute 708 11 783 30" id="button3" class="btn2" text="거래처삭제" onclick="button3_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_custlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="custcd" type="STRING"/>
- <Column id="custnm" type="STRING"/>
- <Column id="custdeptcd" type="STRING"/>
- <Column id="custtel" type="STRING"/>
- <Column id="custmail" type="STRING"/>
- <Column id="chargenm" type="STRING"/>
- <Column id="chargetel" type="STRING"/>
- <Column id="memo" type="STRING"/>
- <Column id="histno" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드 "/>
- <Column id="depthngnm" type="STRING" size="256" sumtext="부서코드 통합 마스터의 통합부서명 "/>
- <Column id="depthngabbr" type="STRING" size="256" sumtext="부서한글 약어 "/>
- <Column id="deptengnm" type="STRING" size="256" sumtext="부서코드의 영문명칭 "/>
- <Column id="deptengabbr" type="STRING" size="256" sumtext="진료과가 사용하고 있는 영문 약어 "/>
- <Column id="deptplce" type="STRING" size="256" sumtext="부서위치(층정보+부서명으로 Text구성)"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_oproomlist" 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_init_ccrtstatlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="ccrtstatcd" type="STRING" size="256" sumtext="Cart상태코드"/>
- <Column id="ccrtstatnm" type="STRING" size="256" sumtext="Cart상태명"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_hardcodeinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdid" type="STRING" size="256" sumtext="단위코드"/>
- <Column id="cdnm" type="STRING" size="256" sumtext="단위명"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_SendDatavalue" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_tmp" 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-11-13
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-11-13 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include 'com_commonxp::comm_main.xjs';
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Local methods
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument :
- * Description :
- ****************************************************************************************/
- //=======================================================================================
- // callback
- //---------------------------------------------------------------------------------------
- function callback(sSvcId, nErrorCode, sErrorMsg){
- arErrorCode.push(sSvcId, nErrorCode);
- }
- //=======================================================================================
- // Events
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument :
- * Description : onload
- ****************************************************************************************/
- function SMMNP02200_onload(obj:Form, e:LoadEventInfo){
- frmf_initForm(obj); //폼 초기화
-
- grdf_setRowTypeIcon(grd_custlist,0);
- dsf_createDs("ds_req", [
- { col: "searchitem", type: "STRING", size: 256 },
- { col: "flag", type: "STRING", size: 256 },
- { col: "selectflag", type: "STRING", size: 256 },
- { col: "deptflag", type: "STRING", size: 256 }
- ]);
-
- ds_req.addRow();
-
- ds_req.setColumn(0, 'flag', 'X');
- ds_req.setColumn(0, 'searchitem', 'XX');
- ds_req.setColumn(0, 'deptflag', '011');
-
- ds_init_deptlist.clearData();
- ds_init_deptlist.addRow();
-
- ds_init_oproomlist.clearData();
- ds_init_oproomlist.addRow();
-
- ds_init_ccrtstatlist.clearData();
- ds_init_ccrtstatlist.addRow();
-
- var oParam = {};
- oParam.id = "TRMNP00107";
- oParam.service = "opanstapp.OpAnstPatMngt";
- oParam.method = "reqGetComboList";
- oParam.inds = "req=ds_req";
- oParam.outds = "ds_init_deptlist=deptlist ds_init_oproomlist=oproomlist ds_init_ccrtstatlist=ccrtstatlist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNP00107";
- tranf_submit(oParam);
-
- ds_req.clear();
-
- dsf_createDsRow("ds_req", [
- { col: "cdgrupid", type: "STRING", size: 256, val: '200' }, // 메모기준자료
- { col: "cdid", type: "STRING", size: 256, val: '' }, // 서브구분
- { col: "supcdid", type: "STRING", size: 256, val: '' }, // 서브구분
- { col: "cdnm", type: "STRING", size: 256, val: '' }
- ]);
-
- oParam = {};
- oParam.id = "TRMNP04903";
- oParam.service = "opanstapp.OpAnstRef";
- oParam.method = "reqGetOpCommonCd";
- oParam.inds = "reqdata=ds_req";
- oParam.outds = "ds_init_hardcodeinfo=hardcodeinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRMNP04903";
- tranf_submit(oParam);
-
- ds_main_custlist.clearData();
- ds_main_custlist.addRow();
-
- this.setTimer(0, 100);
- /*
- oParam = {};
- oParam.id = "TRMNP02201";
- oParam.service = "opanstapp.OpAnstCCrtPrcpMngt";
- oParam.method = "reqGetCustList";
- oParam.inds = "";
- oParam.outds = "ds_main_custlist=custlist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNP02201";
- tranf_submit(oParam);
- */
- }
- /****************************************************************************************
- * Argument :
- * Description : 거래처추가 버튼 클릭 이벤트
- ****************************************************************************************/
- function button4_onclick(obj:Button, e:ClickEventInfo){
- frmf_modal("SMMNP04410", "SMMNP04410", "", "", 1, 1, 1, "", "", "", "", "", "M");
-
- var getData = frmf_getParameter("SendData");
- if(utlf_isNull(getData)){
- return;
- }else{
-
- ds_main_custlist.addRow();
- var getDataTemp = getData.split('|');
-
- ds_main_custlist.setColumn(grd_custlist.currentrow, 'custcd', getDataTemp[0]);
- ds_main_custlist.setColumn(grd_custlist.currentrow, 'custnm', getDataTemp[1]);
- ds_main_custlist.setColumn(grd_custlist.currentrow, 'custtel', getDataTemp[2]);
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 거래처삭제 버튼 클릭 이벤트
- ****************************************************************************************/
- function button3_onclick(obj:Button, e:ClickEventInfo){
- if(grd_custlist.currentrow < 0){
- sysf_messageBox('삭제할 거래처를 선택하십시요!', 'E000');
- return;
- }
- ds_main_custlist.updatecontrol =false;
- ds_main_custlist.setRowType(grd_custlist.currentrow, Dataset.ROWTYPE_DELETE);
- ds_main_custlist.updatecontrol =true;
- }
- /****************************************************************************************
- * Argument :
- * Description : 저장 버튼 클릭 이벤트
- ****************************************************************************************/
- function button1_onclick(obj:Button, e:ClickEventInfo){
- var updated = grdf_getGridUpdateData(grd_custlist, 'all');
- grdf_setStatusColumn(updated, "status");
- ds_tmp.clearData();
- ds_tmp.addRow();
- ds_tmp.copyData(updated, true);
-
- var oParam = {};
- oParam.id = "TXMNP02201";
- oParam.service = "opanstapp.OpAnstCCrtPrcpMngt";
- oParam.method = "reqExeCustList";
- oParam.inds = "savedata=ds_tmp";
- oParam.outds = "ds_main_custlist=custlist";
- oParam.async = false;
- //oParam.callback = "cf_TXMNP02201";
- tranf_submit(oParam);
- }
- function SMMNP02200_ontimer(obj:Form, e:TimerEventInfo)
- {
- if( e.timerid == 0 ){
- this.killTimer(0);
-
- oParam = {};
- oParam.id = "TRMNP02201";
- oParam.service = "opanstapp.OpAnstCCrtPrcpMngt";
- oParam.method = "reqGetCustList";
- oParam.inds = "";
- oParam.outds = "ds_main_custlist=custlist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNP02201";
- tranf_submit(oParam);
- }
- }
- var lastrow1 = -1;
- var lastcol1 = -1;
- var bDrop1 = false;
- function grd_custlist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- lastrow1 = -1;
- lastcol1 = -1;
- }
- function grd_custlist_oncloseup(obj:Grid, e:GridEditEventInfo)
- {
- var dsGridBind = eval(obj.binddataset);
- var preVal = utlf_transNullToEmpty(dsGridBind.getColumn(e.row, e.col));
- var posVal = utlf_transNullToEmpty(e.value);
-
- if( bDrop1 == true && (!utlf_isNull(posVal) || preVal != posVal) ){
- obj.showEditor(false);
- }
-
- bDrop1 = false;
- lastrow1 = e.row;
- lastcol1 = e.col;
- }
- function grd_custlist_onlbuttonup(obj:Grid, e:GridMouseEventInfo)
- {
- grdf_setSelectedCell(obj, e);
-
- var dsGridBind = eval(obj.binddataset);
-
- // Combo DropDown Click 처리
- obj.autoenter = "key";
-
- if( e.fromreferenceobject.name == "dropbutton" ){
- bDrop1 = true;
- }
- if( e.row > -1 && obj.getCellProperty("body", e.col, "edittype") == "combo" ){
- // Combo 선택시 활성화 및 combodatacol 변경
- if( grdf_getSelectedCols(obj).length == 0 && grdf_getSelectedRows(obj).length == 0 && obj.getEditText() == undefined ){
- obj.showEditor(true);
- }else{
- if(!obj.isDropdownCombo() && (lastrow1 != e.row || lastcol1 != e.col)) {
- obj.setCellPos(e.col);
- dsGridBind.rowposition = e.row;
- obj.showEditor(true);
- if(bDrop1) {
- obj.dropdownCombo();
- }
- }
- }
- }else{
- obj.autoenter = "key";
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|