123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMAEB03500" position="absolute 0 0 1192 782" titletext="조영제/재료 코드 관리" oninit="SMAEB03500_oninit" onload="SMAEB03500_onload">
- <Layouts>
- <Layout>
- <Static text="조영제/재료 코드 관리" position="absolute 0 0 180 25" id="caption19" class="tit_1"/>
- <Shape position="absolute 0 90 1190 96" linetype="horizontal" id="line2" class="line_10" anchor="left top right"/>
- <Button position="absolute 1080 68 1133 90" id="btn_grdadd" class="btn2" text="행추가" onclick="btn_grdadd_onclick" anchor="top right"/>
- <Button position="absolute 1137 68 1190 90" id="btn_grddel" class="btn2" text="행삭제" onclick="btn_grddel_onclick" anchor="top right"/>
- <Div position="absolute 0 749 1191 780" id="grp_btn" anchor="left right bottom">
- <Layouts>
- <Layout>
- <Shape position="absolute 0 0 1190 6" linetype="horizontal" id="line32" class="line_6" anchor="left top right"/>
- <Button position="absolute 1073 6 1129 28" id="button1" class="btn4" text="저장" anchor="top right" onclick="grp_btn_button1_onclick"/>
- <Button position="absolute 1133 6 1189 28" id="btn_close" class="btn4" text="닫기" anchor="top right" onclick="grp_btn_btn_close_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Grid position="absolute 0 95 1190 751" id="grd_goodlist" binddataset="ds_main_goodlist_item" cellsizingtype="both" onexpandup="grd_goodlist_onexpandup" autoenter="select" anchor="all" selecttype="multirow">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="160"/>
- <Column size="540"/>
- <Column size="109"/>
- <Column size="118"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="88"/>
- </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"/>
- <Cell col="6"/>
- <Cell col="7" text="구분"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="text" edittype="expr:getRowType(currow) == 2 ? 'text' : 'none'" text="bind:goodcd" editautoselect="true" expandshow="expr:getRowType(currow) == 2 ? 'show' : 'hide'" enable="false"/>
- <Cell col="2" displaytype="text" edittype="text" text="bind:goodnm" editautoselect="true"/>
- <Cell col="3" edittype="masknumber" style="align:right middle;" text="bind:safestocqty" editautoselect="true"/>
- <Cell col="4" displaytype="text" edittype="text" style="align:center middle;" text="bind:speccd" editautoselect="true"/>
- <Cell col="5" text="bind:instcd"/>
- <Cell col="6" text="bind:suppdeptcd"/>
- <Cell col="7" displaytype="combo" edittype="combo" style="align:center;" text="bind:itemcd" combodataset="ds_itemcd" combocodecol="itemcd" combodatacol="itemnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Div id="grp_srch" taborder="1" position="absolute 0 25 1190 65" class="div_SA" anchor="left top right">
- <Layouts>
- <Layout>
- <Button id="btn_sea" taborder="0" text="조회" class="btn1" position="absolute 1118 10 1174 32" anchor="top right" onclick="grp_srch_btn_sea_onclick"/>
- <Edit id="input1" taborder="1" class="input_search" position="absolute 416 11 516 30" anchor="default" onkeydown="grp_srch_input1_onkeydown"/>
- <Static id="caption2" text="조영제재료명 :" class="search_name" position="absolute 300 14 408 31" anchor="default"/>
- <Edit id="input8" taborder="2" class="input_search" position="absolute 142 12 242 31" anchor="default" onkeydown="grp_srch_input8_onkeydown"/>
- <Static id="caption1" text="조영제/재료코드 :" class="search_name" position="absolute 12 14 136 31" anchor="default"/>
- <Shape id="line6" linetype="vertical" class="line_4" position="absolute 1097 10 1103 32" anchor="top right"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_goodlist_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="goodcd" type="STRING" size="256"/>
- <Column id="goodnm" type="STRING" size="256"/>
- <Column id="speccd" type="STRING" size="256"/>
- <Column id="safestocqty" type="STRING" size="256"/>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="suppdeptcd" type="STRING" size="256"/>
- <Column id="itemcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="goodcd"/>
- <Col id="goodnm"/>
- <Col id="speccd"/>
- <Col id="safestocqty"/>
- <Col id="instcd"/>
- <Col id="suppdeptcd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_srch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="srchgoodcd" type="STRING" size="256"/>
- <Column id="srchgoodnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="srchgoodcd"/>
- <Col id="srchgoodnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_req_data" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="suppdeptcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_hidden_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="goodcd" type="STRING" size="256"/>
- <Column id="goodnm" type="STRING" size="256"/>
- <Column id="speccd" type="STRING" size="256"/>
- <Column id="safestocqty" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="goodcd"/>
- <Col id="goodnm"/>
- <Col id="speccd"/>
- <Col id="safestocqty"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_itemcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="itemcd" type="STRING" size="256"/>
- <Column id="itemnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="itemcd">C</Col>
- <Col id="itemnm">조영제</Col>
- </Row>
- <Row>
- <Col id="itemcd">M</Col>
- <Col id="itemnm">재료</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_srch.input1" propid="value" datasetid="ds_send_srch" columnid="srchgoodnm"/>
- <BindItem id="item1" compid="grp_srch.input8" propid="value" datasetid="ds_send_srch" columnid="srchgoodcd"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2016-06-17
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2016-06-17 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs"
- include "ast_examcurexp::AEZ0001.xjs"
- include "ast_commonxp::AST.xjs"
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- var gSuppdeptcd = "";
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : N/A
- * Description :
- ****************************************************************************************/
- function fnGetMainList() {
- ds_main_goodlist_item.clearData();
-
- dsf_createDsRow("ds_req", [
- {col:"srchgoodcd", type:"STRING", size:256, val:ds_send_srch.getColumn(0,"srchgoodcd")}
- , {col:"srchgoodnm", type:"STRING", size:256, val:ds_send_srch.getColumn(0,"srchgoodnm")}
- , {col:"basesuppdeptcd", type:"STRING", size:256, val:gSuppdeptcd}
- ]);
- var oParam = {};
- oParam.id = "TRAEB03501";
- oParam.service = "examcurebaseapp.DyeCode";
- oParam.method = "reqGetDyeCodeList";
- oParam.inds = "req=ds_req";
- oParam.outds = "ds_main_goodlist_item=item";
- oParam.async = true;
- //oParam.callback = "cf_TRAEB03501";
- tranf_submit(oParam);
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SMAEB03500
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SMAEB03500_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); // 폼 초기화
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SMAEB03500
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SMAEB03500_onload(obj:Form, e:LoadEventInfo)
- {
- // 메뉴 파라미터가 지정되어 있으면 해당 값으로 셋팅하고 그렇치 않으면 기본값 셋팅
- var suppdeptcd = "";
- suppdeptcd = frmf_getMenuParam();
- if (utlf_isNull(suppdeptcd)){
- lf_aezfSetSuppDeptcd(); //AEZ0001.xjs
- gSuppdeptcd = frmf_getParameter("AST_DEPTCD");
- }else{
- gSuppdeptcd = suppdeptcd;
- }
-
- ds_main_goodlist_item.clearData();
- grdf_setRowTypeIcon(grd_goodlist, 0); // 그리드 상태 표시
- }
- /****************************************************************************************
- * Components : Edit
- * Components ID : grp_srch.input8
- * Event : onkeydown
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 조영제/재료코드 입력 후 조회
- ****************************************************************************************/
- function grp_srch_input8_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if ( e.keycode == 13 ) {
- obj.updateToDataset();
- fnGetMainList();
- }
- }
- /****************************************************************************************
- * Components : Edit
- * Components ID : grp_srch.input8
- * Event : onkeydown
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 조영제재료명 입력 후 조회
- ****************************************************************************************/
- function grp_srch_input1_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if ( e.keycode == 13 ) {
- obj.updateToDataset();
- fnGetMainList();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : grp_srch.btn_sea
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 조회
- ****************************************************************************************/
- function grp_srch_btn_sea_onclick(obj:Button, e:ClickEventInfo)
- {
- fnGetMainList();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_grdadd
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 행추가
- ****************************************************************************************/
- function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
- {
- var cnt = ds_main_goodlist_item.addRow();
- ds_main_goodlist_item.setColumn(cnt,"suppdeptcd",gSuppdeptcd);
- // grd_goodlist.isReadOnly(cnt, 1) = false; //신규추가일 경우만 조영제/재료코드 에디트 가능 EXPR서 처리
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_grddel
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 행삭제
- ****************************************************************************************/
- function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_main_goodlist_item.getRowType(ds_main_goodlist_item.rowposition)==2) {
- ds_main_goodlist_item.deleteRow(ds_main_goodlist_item.rowposition);
- } else {
- grdf_setStatus(grd_goodlist, "D", [ds_main_goodlist_item.rowposition]);
- }
- }
- /****************************************************************************************
- * Components : Grid
- * Components ID : grd_goodlist
- * Event : onexpandup
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 조영제/재료코드 조회 팝업 오픈
- ****************************************************************************************/
- function grd_goodlist_onexpandup(obj:Grid, e:GridMouseEventInfo)
- {
- // modal("SPAEB00402", "", "200", "200", "popup", "/root/hidden/pseursrvinfo", "/root/init/pseursrvinfo");
- ds_temp.clearData();
- if ( ds_temp.rowcount < 1 ) {
- ds_temp.addRow();
- }
- frmf_modal("SPAEB00402", "SPAEB00402", null, null, 0, 200, 200, null, null, null, null, null, "M");
-
- if(!utlf_isNull(ds_temp.getColumn(0,"goodcd"))) {
- ds_main_goodlist_item.setColumn(e.row,"goodcd" , ds_temp.getColumn(0,"goodcd"));
- ds_main_goodlist_item.setColumn(e.row,"goodnm" , ds_temp.getColumn(0,"goodnm"));
- ds_main_goodlist_item.setColumn(e.row,"safestocqty" , ds_temp.getColumn(0,"safestocqty"));
- ds_main_goodlist_item.setColumn(e.row,"speccd" , ds_temp.getColumn(0,"speccd"));
- }
- // ds_temp.setColumn(0,"goodcd", "");
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : grp_btn.button1
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 저장
- ****************************************************************************************/
- function grp_btn_button1_onclick(obj:Button, e:ClickEventInfo)
- {
- if(!astfNullValidation(ds_main_goodlist_item, "goodcd", "제품코드를")) return false;
- if(!astfNullValidation(ds_main_goodlist_item, "goodnm", "제품명을")) return false;
-
- ds_send_req.setColumn(0, "suppdeptcd", gSuppdeptcd);
-
- for(var i = 0; i < ds_main_goodlist_item.rowcount; i++) {
- var goodcd = ds_main_goodlist_item.getColumn(i,"goodcd");
- var cnt = ds_main_goodlist_item.getCaseCount("goodcd == '"+goodcd+"'");
-
- if(cnt > 1) {
- sysf_messageBox("약품코드[" + goodcd + "]가 ", "E006");
- return false;
- }
- }
- if ( sysf_messageBox("","Q002")==6 ) {
- var update = grdf_getGridUpdateData(grd_goodlist, "all");
- if(update.rowcount < 1) {
- sysf_messageBox("업데이트 정보가 없습니다.", "I");
- return 0;
- } else {
- grdf_setStatusColumn(update, "m");
- ds_send_req_data.copyData(update,true);
- //dsf_setFixVal(ds_send_req_data, "bdioflag:-,itemflag:-,itemcd:-");
- dsf_setFixVal(ds_send_req_data, "bdioflag:-,itemflag:-");
- var oParam = {};
- oParam.id = "TXAEB03501";
- oParam.service = "examcurebaseapp.DyeCode";
- oParam.method = "reqExeDyeCodeList";
- oParam.inds = "req=ds_send_req_data";
- oParam.outds = "ds_hidden_item=item";
- oParam.async = false;
- oParam.callback = "cf_TXAEB03501";
- tranf_submit(oParam);
- // if (submit("TXAEB03501")) {
- // // 저장 후 팝업인 경우 변경 여부 returng하고 창을 닫는다
- // submit("TRAEB03501");
- // }
- }
- }
- }
- function cf_TXAEB03501(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- fnGetMainList();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : grp_btn.btn_close
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 닫기
- ****************************************************************************************/
- function grp_btn_btn_close_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- ]]></Script>
- </Form>
- </FDL>
|