123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMNP01602" position="absolute 0 0 998 630" titletext="처방(물품)찾기" onload="SPMNP01602_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 995 624" id="grp_main" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Shape position="absolute 0 26 995 32" linetype="horizontal" id="line1" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
- <Static text="방재고 리스트" position="absolute 5 8 150 25" id="caption16" class="tit_2"/>
- <Button position="absolute 943 6 985 25" id="button1" class="btn2" enable="true" text="닫기" onclick="grp_main_button1_onclick"/>
- <Button position="absolute 897 6 939 25" id="bbt_choice" class="btn2" enable="true" text="선택" onclick="grp_main_bbt_choice_onclick"/>
- <Button position="absolute 851 6 893 25" id="btn_search" class="btn2" text="조회" onclick="grp_main_btn_search_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Grid position="absolute 0 31 994 623" id="grd_goodlist" class="datagrid2" binddataset="ds_main_goodlist" ontextchanged="grd_goodlist_ontextchanged" autoenter="select" onenterdown="grd_goodlist_onenterdown" cellsizingtype="col" selecttype="multirow" onheadclick="grd_goodlist_onheadclick" onselectchanged="grd_goodlist_onselectchanged">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25"/>
- <Column size="30"/>
- <Column size="38"/>
- <Column size="38"/>
- <Column size="38"/>
- <Column size="75"/>
- <Column size="40"/>
- <Column size="165"/>
- <Column size="110"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="42"/>
- <Column size="42"/>
- <Column size="42"/>
- <Column size="45"/>
- <Column size="62"/>
- </Columns>
- <Rows>
- <Row size="32" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox"/>
- <Cell col="2" text="부서 구분"/>
- <Cell col="3" text="구매 구분"/>
- <Cell col="4" text="수술 방"/>
- <Cell col="5" text="물품코드"/>
- <Cell col="6" text="SUB"/>
- <Cell col="7" text="물품명"/>
- <Cell col="8" text="규격"/>
- <Cell col="9" text="모델"/>
- <Cell col="10" text="제조원"/>
- <Cell col="11" text="기준 수량"/>
- <Cell col="12" text="안전 재고"/>
- <Cell col="13" text="방 재고"/>
- <Cell col="14" text="의뢰 단위"/>
- <Cell col="15" text="의뢰 수량"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="expr:currow + 1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:chkflag" expr="expr:(chkflag == "true" || chkflag == 1) ? 1 : 0"/>
- <Cell col="2" text="bind:deptflag"/>
- <Cell col="3" text="bind:purcflag"/>
- <Cell col="4" text="bind:oproomnm"/>
- <Cell col="5" text="bind:goodcd"/>
- <Cell col="6" text="bind:allsizespecid"/>
- <Cell col="7" style="align:left top;padding:4 2 2 2;" text="bind:goodnm" wordwrap="char"/>
- <Cell col="8" style="align:left top;padding:4 2 2 2;" text="bind:goodspec" wordwrap="char"/>
- <Cell col="9" style="align:left top;" text="bind:goodmodel" wordwrap="char"/>
- <Cell col="10" style="align:left;" text="bind:prodcmpynm" wordwrap="char"/>
- <Cell col="11" style="align:right;" text="bind:acmlbaseqty"/>
- <Cell col="12" style="align:right;" text="bind:safestocqty"/>
- <Cell col="13" style="align:right;" text="bind:stocqty"/>
- <Cell col="14" text="bind:deliveunit"/>
- <Cell col="15" displaytype="normal" edittype="text" style="align:right;padding:0 3 0 3;background:#ccffccff;background2:#ccffccff;" text="bind:reqqty" editautoselect="true" editacceptsenter="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grd_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="chkflag" type="STRING"/>
- <Column id="deptflag" type="STRING"/>
- <Column id="purcflag" type="STRING"/>
- <Column id="oproomnm" type="STRING"/>
- <Column id="goodcd" type="STRING"/>
- <Column id="allsizespecid" type="STRING"/>
- <Column id="goodnm" type="STRING"/>
- <Column id="goodspec" type="STRING"/>
- <Column id="goodmodel" type="STRING"/>
- <Column id="prodcmpynm" type="STRING"/>
- <Column id="acmlbaseqty" type="STRING"/>
- <Column id="safestocqty" type="STRING"/>
- <Column id="stocqty" type="STRING"/>
- <Column id="deliveunit" type="STRING"/>
- <Column id="reqqty" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_goodlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_goodlist_oncolumnchanged">
- <ColumnInfo>
- <Column id="chkflag" type="STRING" size="256"/>
- <Column id="deptflag" type="STRING" size="256"/>
- <Column id="purcflag" type="STRING" size="256"/>
- <Column id="oproomnm" type="STRING" size="256"/>
- <Column id="goodcd" type="STRING" size="256"/>
- <Column id="allsizespecid" type="STRING" size="256"/>
- <Column id="goodnm" type="STRING" size="256"/>
- <Column id="goodspec" type="STRING" size="256"/>
- <Column id="goodmodel" type="STRING" size="256"/>
- <Column id="prodcmpynm" type="STRING" size="256"/>
- <Column id="acmlbaseqty" type="STRING" size="256"/>
- <Column id="safestocqty" type="STRING" size="256"/>
- <Column id="stocqty" type="STRING" size="256"/>
- <Column id="deliveunit" type="STRING" size="256"/>
- <Column id="reqqty" type="STRING" size="256"/>
- <Column id="prcpunit" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="chkflag"/>
- <Col id="deptflag"/>
- <Col id="purcflag"/>
- <Col id="oproomnm"/>
- <Col id="goodcd"/>
- <Col id="allsizespecid"/>
- <Col id="goodnm"/>
- <Col id="goodspec"/>
- <Col id="goodmodel"/>
- <Col id="prodcmpynm"/>
- <Col id="acmlbaseqty"/>
- <Col id="safestocqty"/>
- <Col id="stocqty"/>
- <Col id="deliveunit"/>
- <Col id="reqqty"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_GoodData_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="refflag" type="STRING" size="256"/>
- <Column id="refnm" type="STRING" size="256"/>
- <Column id="goodflag" type="STRING" size="256"/>
- <Column id="goodcond" type="STRING" size="256"/>
- <Column id="lrgcd" type="STRING" size="256"/>
- <Column id="mdlcd" type="STRING" size="256"/>
- <Column id="smlcd" type="STRING" size="256"/>
- <Column id="offset" type="STRING" size="256"/>
- <Column id="pagesize" type="STRING" size="256"/>
- <Column id="tabflag" type="STRING" size="256"/>
- <Column id="refcmpy" type="STRING" size="256"/>
- <Column id="refcust" type="STRING" size="256"/>
- <Column id="refprcp" type="STRING" size="256"/>
- <Column id="prcpflag" type="STRING" size="256"/>
- <Column id="winflag" type="STRING" size="256"/>
- <Column id="oproomcd" type="STRING" size="256"/>
- <Column id="cartgubn" type="STRING" size="256"/>
- <Column id="menuparam" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="refflag">1</Col>
- <Col id="refnm"/>
- <Col id="goodflag"/>
- <Col id="goodcond"/>
- <Col id="lrgcd"/>
- <Col id="mdlcd"/>
- <Col id="smlcd"/>
- <Col id="offset"/>
- <Col id="pagesize">500</Col>
- <Col id="tabflag">CCR</Col>
- <Col id="refcmpy"/>
- <Col id="refcust"/>
- <Col id="refprcp"/>
- <Col id="prcpflag">Y</Col>
- <Col id="winflag"/>
- <Col id="oproomcd"/>
- <Col id="cartgubn"/>
- <Col id="menuparam">S</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_GoodData_goodflaglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="goodflagcd" type="STRING" size="256"/>
- <Column id="goodflagnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="goodflagcd"/>
- <Col id="goodflagnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_GoodData_lrglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="lrgcd" type="STRING" size="256"/>
- <Column id="lrgnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="lrgcd"/>
- <Col id="lrgnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_GoodData_mdllist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="mdlcd" type="STRING" size="256"/>
- <Column id="mdlnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="mdlcd"/>
- <Col id="mdlnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_GoodData_smllist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="smlcd" type="STRING" size="256"/>
- <Column id="smlnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="smlcd"/>
- <Col id="smlnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_GoodData_prcplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="prcpclscd" type="STRING" size="256"/>
- <Column id="prcpclsnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="prcpclscd"/>
- <Col id="prcpclsnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_reqdata" 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"/>
- <Dataset id="ds_HideData_condition" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="deptflag" type="STRING" size="256"/>
- <Column id="cartgubn" type="STRING" size="256"/>
- <Column id="oproomcd" type="STRING" size="256"/>
- <Column id="insukind" type="STRING" size="256"/>
- <Column id="payflagcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="deptflag"/>
- <Col id="cartgubn"/>
- <Col id="oproomcd"/>
- <Col id="insukind"/>
- <Col id="payflagcd"/>
- </Row>
- </Rows>
- </Dataset>
- </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
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- //include "emr_opanstxp::SPMNP01602.xjs";
- var arErrorCode = new HashArray();
- /* ---------------------------------------------------------------------
- 처방(물품)찾기(SMMNP01602.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By Francis Choi
- : 2015.05.02
- ---------------------------------------------------------------------- */
- var CondPath = "ds_init_GoodData_cond";
- var SendPath = "ds_send_reqdata";
- var sOproomcd = "";
- var sCartGubn = "";
- /* ------------------------------------------------- */
- /* SMMNP01602_처방(물품)찾기 */
- /* On Load 시 Call */
- /* ------------------------------------------------- */
- /* group : EMR 간호 수술마취 */
- /* ver : 2015.05.15 */
- /* by : 최학록 */
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : xforms-ready시 수행한다 */
- /* return : */
- /* --------------------------------------------------*/
- function fGoodInit() {
- sOproomcd = opener.frmf_getParameter("SPMNP01602_oproomcd");
- sCartGubn = opener.frmf_getParameter("SPMNP01602_cartgubn");
- ds_HideData_condition.setColumn( 0, "cartgubn", sCartGubn);
- ds_HideData_condition.setColumn( 0, "oproomcd", sOproomcd);
- opener.frmf_setParameter("SPMNP01602_oproomcd","");
- opener.frmf_setParameter("SPMNP01602_cartgubn","");
- //grd_goodlist.fixedcellcheckbox(0,1) = true;
- ds_main_goodlist.clearData();
- if (frmf_checkOpener() ) {
- fDataQuery();
- }
- }
- // --------------------------------------
- // P:처방분류선택, G:물품구분선택
- // --------------------------------------
- function fDataQuery() {
- //model.copyNode(SendPath, CondPath);
- eval(SendPath).copyData(eval(CondPath));
-
- dsf_makeValue(eval(SendPath), "oproomcd", "string", sOproomcd);
- dsf_makeValue(eval(SendPath), "deptflag", "string", ds_HideData_condition.getColumn(0, "cartgubn"));
- //submit("TRMNP04606");
- var oParam = {};
- oParam.id = "TRMNP04606";
- oParam.service = "opanstapp.OpAnstStocMngt";
- oParam.method = "reqGetStocRgstGoodList";
- oParam.inds = "reqdata=" + SendPath;
- oParam.outds = "ds_main_goodlist=goodlist";
- oParam.async = false;
- tranf_submit(oParam);
-
- ds_main_goodlist.rowposition = -1;
- }
- // --------------------------------------
- // Grid Data Click
- // --------------------------------------
- function fGridDataClick(pGrid, pName) {
- var iRow = pGrid.currentrow;
- var pPathChkFlag = eval("ds_main_"+ pName).getColumn( iRow, "chkflag");
- if (pGrid.rowcount < 1 || pGrid.currentrow == -1){
- return;
- }
- else if (pGrid.currentcol == -1) {
- return;
- }else {
- var sFlag = pPathChkFlag;
- eval("ds_main_"+ pName).setColumn( iRow, "chkflag", "string", ((sFlag == "true") ? "false" :"true"));
- }
- }
- // --------------------------------------
- // Query Condition Select 조회 조건 선택
- // --------------------------------------
- function fChoiceData() {
- var iParamList = "";
- var wCnt = 0 ;
- var wIDx = 0 ;
- var oproomcd = ds_HideData_condition.getColumn(0, "oproomcd");
- var iNode = "ds_main_goodlist";
- var wChk = "";
- var iRows = eval(iNode).rowcount;
- dsf_setDefaultVal(eval(iNode),"all");
-
- for( var i= 0; i < iRows; i++ ) {
- wChk = eval(iNode).getColumn( i , "chkflag");
- if (wChk == "true" || wChk == "1" ) {
- iParamList += eval(iNode).getColumn( i , "purcflag") + "|" // 00 구매구분
- + eval(iNode).getColumn( i , "goodcd") + "|" // 01 물품코드
- + eval(iNode).getColumn( i , "allsizespecid") + "|" // 02 사이즈
- + eval(iNode).getColumn( i , "goodnm") + "|" // 03 물품명
- + eval(iNode).getColumn( i , "goodspec") + "|" // 04 물품규격
- + eval(iNode).getColumn( i , "goodmodel") + "|" // 05 물품모델
- + eval(iNode).getColumn( i , "prodcmpynm") + "|" // 06 제조회사
- + eval(iNode).getColumn( i , "prcpunit") + "|" // 07 처방단위
- + eval(iNode).getColumn( i , "safestocqty") + "|" // 08 안전재고
- + eval(iNode).getColumn( i , "stocqty") + "|" // 09 방재고
- + eval(iNode).getColumn( i , "deliveunit") + "|" // 10 불출단위
- + eval(iNode).getColumn( i , "reqqty") + "|" // 11 의뢰수량
- + oproomcd + "▩"; // 12 수술방
- wCnt += 1;
- }
- }
- if(frmf_checkOpener()){
- if( wCnt > 0 ) {
- opener.fGoodDataDisplay(iParamList);
- }
- }
- }
- /* ------------------------------------------------- */
- /* ------End Of List ------------------------------- */
- /* -------------------------------------------------- */
- function SPMNP01602_onload(obj:Form, e:LoadEventInfo)
- {
- frmf_initForm(obj); // 폼 초기화
- // grdf_initGrid(this.grd_goodlist); //Grid 초기화
-
-
- fGoodInit();
- }
- function grp_main_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- fDataQuery(); // 조회
- }
- function grp_main_bbt_choice_onclick(obj:Button, e:ClickEventInfo)
- {
- fChoiceData();
- }
- function grp_main_button1_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- function ds_main_goodlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if( e.columnid == "chkflag" ){
- obj.setColumn(e.row, "chkflag", (e.newvalue == "true" || e.newvalue == 1) ? "true" : "false");
- tempv=1;
- }
- if(tempv !=1){
- var iRow = -1;
-
- iRow = e.row;
- if( ( utlf_isNull(ds_main_goodlist.getColumn(iRow, "reqqty")))
- ||( ds_main_goodlist.getColumn(iRow, "reqqty") == "0.0")
- ||( ds_main_goodlist.getColumn(iRow, "reqqty") == "0") ){
- ds_main_goodlist.setColumn( iRow , "chkflag", "false");
- iRow++;
- }else {
- ds_main_goodlist.setColumn( iRow , "chkflag", "true");
- iRow++;
- }
-
- // if( iRow != ds_main_goodlist.rowcount ) {
- // ds_main_goodlist.rowposition = iRow;
- // grd_goodlist.setCellPos(e.colidx);
- // grd_goodlist.showEditor(true); //.editCell();
- // }
- }
-
- tempv=0;
- }
- function grd_goodlist_onenterdown(obj:Grid, e:GridEditEventInfo)
- {
- if(e.col ==15){
- var iRow = -1;
-
- iRow = e.row;
- if( ( utlf_isNull(ds_main_goodlist.getColumn(iRow, "reqqty")))
- ||( ds_main_goodlist.getColumn(iRow, "reqqty") == "0.0")
- ||( ds_main_goodlist.getColumn(iRow, "reqqty") == "0") ){
- ds_main_goodlist.setColumn( iRow , "chkflag", "false");
- iRow++;
- }else {
- ds_main_goodlist.setColumn( iRow , "chkflag", "true");
- iRow++;
- }
- }
- if( ds_main_goodlist.rowposition+1 != ds_main_goodlist.rowcount ) {
- ds_main_goodlist.rowposition = ds_main_goodlist.rowposition+1;
- grd_goodlist.setCellPos(e.cell);
- grd_goodlist.showEditor(true); //.editCell();
- }
-
- }
- var tempv=0;
- function grd_goodlist_onheadclick(obj:Grid, e:GridClickEventInfo)
- {
- tempv=1;
- grdf_setEventGrid(grd_goodlist, e);
- tempv=0;
- }
- function grd_goodlist_onselectchanged(obj:Grid, e:GridSelectEventInfo)
- {
- if( e.oldrow != -1 && e.oldcol == 15 ){
- var iRow = -1;
-
- iRow = e.oldrow;
- if( ( utlf_isNull(ds_main_goodlist.getColumn(iRow, "reqqty")))
- ||( ds_main_goodlist.getColumn(iRow, "reqqty") == "0.0")
- ||( ds_main_goodlist.getColumn(iRow, "reqqty") == "0") ){
- ds_main_goodlist.setColumn( iRow , "chkflag", "false");
- iRow++;
- }else {
- ds_main_goodlist.setColumn( iRow , "chkflag", "true");
- iRow++;
- }
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|