123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>SET기구 처방 집계현황</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <cond>
- <fromdd/>
- <todd/>
- <flag/>
- <deptcd/>
- <deptflag/>
- </cond>
- <suminfo>
- <sumlist/>
- </suminfo>
- </main>
- <send>
- <grupid/>
- </send>
- <init>
- <R0435list/>
- <deptinfo>
- <deptlist/>
- </deptinfo>
- </init>
- <hidden>
- </hidden>
- <temp>
- <suminfo>
- <sumlist/>
- </suminfo>
- </temp>
- <tmp>
- <codeinfo/>
- </tmp>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- var length;
- var userdutplcecd;
-
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
-
- submit("TRMNG04202");
-
-
- //fromdd, todd를 당일자로 setting.
- var curdd = getCurrentDate();
-
- model.makeValue("/root/send/plandd", curdd);
- model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
- submit("TRMNB01208");
-
-
-
- model.setValue(ipt_fromdd.attribute("ref"), getCurrentDate());
- model.setValue(ipt_todd.attribute("ref"), getCurrentDate());
-
- ipt_fromdd.refresh();
- ipt_todd.refresh();
-
- model.makeValue("/root/send/cdgrupid", "'160', 'T17', '002'");
- model.makeValue("/root/send/srchdd", getCurrentDate());
- submit("TRMNW00001")
-
- var erdeptcd = model.getValue("/root/tmp/codeinfo/codelist[cdgrupid='002' and cdid = '"+getUserInfo("dutplcecd")+"']/cdid");
-
- userdutplcecd = model.getValue("/root/tmp/codeinfo/codelist[cdgrupid='160' and cdid = '"+getUserInfo("dutplcecd")+"']/cdid");
-
- if (!isNull(userdutplcecd)) {
- btn_sav.visible = true;
-
- } else {
- if(getUserInfo("userid")=="ENR") {
- btn_sav.visible = true;
- } else {
- btn_sav.visible = false;
- if(!isNull(erdeptcd)) {
- cmb_deptcd.value = model.getValue("/root/init/dutinfo/userinfo[userid='" + getUserInfo("userid") + "']/deptcd");
- } else {
- cmb_deptcd.value = getUserInfo("dutplcecd");
- }
-
- cmb_deptcd.disabled = true;
-
- rdo_deptflag.disabled = true;
- }
-
-
- }
-
- zbcfGetCodeList( new Array ( "R0435"), new Array ( "/root/init/R0435list" ), false);
-
- rdo_flag.value="1";
-
- grd_sumlist.colHidden(grd_sumlist.colRef("reqdeptnm")) = true;
-
- var node = instance1.selectNodes("/root/init/R0435list/R0435");
-
- length = node.length;
-
- var caption = "구분^일자^부서코드^부서명";
- var colName = "";
-
-
- for(var i = 1; i <= node.length; i++) {
- grd_sumlist.addColumn("ref:a1qty" + i + "; type:output; text-align:center; format:(-)#,#### ");
- grd_sumlist.colWidth(grd_sumlist.cols - 1) = 55;
-
- grd_sumlist.addColumn("ref:a2qty" + i + "; type:input; text-align:center; format:(-)#,#### ");
- grd_sumlist.colWidth(grd_sumlist.cols - 1) = 55;
-
- grd_sumlist.addColumn("ref:sumqty" + i + "; type:output; font-weight:bold; background-color:#eeffee; text-align:center; format:(-)#,#### ");
- grd_sumlist.colstyle(grd_sumlist.cols - 1, "data", "border-right-color") = "#FFF000";
- grd_sumlist.colWidth(grd_sumlist.cols - 1) = 55;
-
- grd_sumlist2.addColumn("ref:a1qty" + i + "; type:output; text-align:center; format:(-)#,#### ");
- grd_sumlist2.colWidth(grd_sumlist2.cols - 1) = 55;
-
- grd_sumlist2.addColumn("ref:a2qty" + i + "; type:input; text-align:center; format:(-)#,#### ");
- grd_sumlist2.colWidth(grd_sumlist2.cols - 1) = 55;
-
- grd_sumlist2.addColumn("ref:sumqty" + i + "; type:output; border-right-color:#000000; text-align:center; format:(-)#,#### ");
- grd_sumlist2.colWidth(grd_sumlist2.cols - 1) = 55;
-
-
- colName = model.getValue("/root/init/R0435list/R0435[" + i + "]/cdnm");
-
- caption += "^" + colName + "^" + colName + "^" + colName;
-
-
-
- }
- caption += "|구분^일자^부서코드^부서명";
- for(var i = 1; i <= node.length; i++) {
- caption += "^처방^불출^합계";
- }
-
- grd_sumlist.caption = caption;
- grd_sumlist2.caption = caption;
- //일자^1^1^1|일자^멸균^처방^합계
-
- addComboItem("cmb_deptcd", "전체", "", "above");
-
- tar_hidden.visible = false;
-
- grd_sumlist.rowstyle(0, "fixed", "font-weight") = "bold";
- grd_sumlist.cellStyle("font-weight", 0, grd_sumlist.colRef("a1qty1"), 0, grd_sumlist.cols-1) = "bold";
- }
-
- function fSearch(){
- grd_sumlist.subtotal("clear", -1, i, "#,###.##", "background-color:#99ff99; font-weight:bold", 0, cmb_deptcd.label);
- var flag = model.getValue(rdo_flag.attribute("ref"));
-
-
- if(flag == "1") {
-
- var deptcd = model.getValue(cmb_deptcd.attribute("ref"));
-
- if(deptcd == "" || deptcd == null) {
- messageBox("부서를 선택하십시오.", "E");
- return;
- }
-
- model.makeValue("/root/send/reqdata/fromdd", model.getValue(ipt_fromdd.attribute("ref")));
- model.makeValue("/root/send/reqdata/todd", model.getValue(ipt_todd.attribute("ref")));
- model.makeValue("/root/send/reqdata/deptcd", model.getValue(cmb_deptcd.attribute("ref")));
- model.makeValue("/root/send/reqdata/deptflag", model.getValue(rdo_deptflag.attribute("ref")));
-
- submit("TRMNG04201"); //일자별 조회
-
- grd_sumlist.subtotalPosition="below";
-
- var cellflag;
-
- for(var i = grd_sumlist.colRef("delivedd") + 1; i < grd_sumlist.cols; i++) {
- cellflag = grd_sumlist.valueMatrix(i, grd_sumlist.colRef("flag"));
-
- grd_sumlist.rowstyle(i, "data", "background-color") = "#ffffff";
-
- grd_sumlist.subtotal("sum", -1, i, "#,###.##", "background-color:#eeffee; font-weight:bold", grd_sumlist.colRef("delivedd"), "합계");
- }
-
- } else {
- model.makeValue("/root/send/reqdata/fromdd", model.getValue(ipt_fromdd.attribute("ref")));
- model.makeValue("/root/send/reqdata/todd", model.getValue(ipt_todd.attribute("ref")));
- model.makeValue("/root/send/reqdata/deptcd", model.getValue(cmb_deptcd.attribute("ref")));
- model.makeValue("/root/send/reqdata/deptflag", model.getValue(rdo_deptflag.attribute("ref")));
-
- submit("TRMNG04203"); //부서별 조회
-
- copyNodesetType("/root/temp/suminfo", "/root/main/suminfo");
-
- grd_sumlist2.refresh();
-
- grd_sumlist.subtotalPosition="below";
-
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++) {
- grd_sumlist.rowstyle(i, "data", "background-color") = "#ffffff";
- }
-
- for(var i = grd_sumlist.colRef("reqdeptnm") + 1; i < grd_sumlist.cols; i++) {
-
- grd_sumlist.subtotal("sum", grd_sumlist.colRef("reqdeptcd"), i, "#,###.##", "background-color:#eeffee; font-weight:bold", grd_sumlist.colRef("reqdeptnm"), "합계");
- }
- var deptcd;
- var fstdeptcd =grd_sumlist.valueMatrix(1, grd_sumlist.colRef("reqdeptcd"));
-
-
- }
-
-
- }
-
- ]]>
- </script>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <submission id="TRMNG04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/suminfo"/>
- <submission id="TRMNG04202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/deptinfo"/>
- <submission id="TRMNG04203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/suminfo"/>
- <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TXMNG04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
- <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/tmp/codeinfo"/>
- <submission id="TRMNB01208" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/dutinfo"/>
- </model>
- </xhtml:head>
- <xhtml:body pagewidth="1211" pageheight="784" style="font-family:돋움체; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; font-family:돋움체; ">SET기구 처방 집계현황</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; font-family:돋움체; ">
- <datagrid id="grd_sumlist2" nodeset="/root/temp/suminfo/sumlist" visibility="hidden" caption="구분^일자^부서코드^부서명|구분^일자^부서코드^부서명" colsep="^" colwidth="100, 85, 0, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:150px; width:645px; height:456px; font-family:돋움체; ">
- <col ref="flag" visibility="hidden"/>
- <col ref="delivedd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <col ref="reqdeptnm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
-
- var flag = grd_sumlist.valueMatrix(grd_sumlist.row, grd_sumlist.colRef("flag"));
-
- if(flag == "1") {
-
- return;
- }
-
- var colNm = grd_sumlist.colAttribute(grd_sumlist.col, "ref"); //현재선택한 컬럼의 참조명을 들고온다.
- var col = parseInt(((grd_sumlist.col + 2) % 3));
-
-
- var seq;
-
-
- if(grd_sumlist.col > 2) {
-
- if(col == 0) {
- seq = colNm.substr(5);
- } else if(col == 1) {
- seq = colNm.substr(5);
- } else if(col == 2) {
- seq = colNm.substr(6);
- }
-
- }
-
- //선택한 컬럼의 순번을 가져온다.
-
- var goodcd = model.getValue("/root/init/R0435list/R0435[dispseq='" + seq + "']/cdid");
- var reqdeptcd = grd_sumlist.valueMatrix(grd_sumlist.row, grd_sumlist.colRef("reqdeptcd"));
- var reqdeptnm = grd_sumlist.valueMatrix(grd_sumlist.row, grd_sumlist.colRef("reqdeptnm"));
-
- var fromdd = "";
- var todd = "";
- var delivedd = grd_sumlist.valueMatrix(grd_sumlist.row, grd_sumlist.colRef("delivedd"));
-
-
-
- if(rdo_flag.value == "1") {
-
- if(delivedd == cmb_deptcd.label) {
- fromdd = ipt_fromdd.value;
- todd = ipt_todd.value;
- } else {
-
- fromdd = delivedd;
- todd = delivedd;
- }
-
- reqdeptcd = cmb_deptcd.value;
- } else {
-
- fromdd = model.getValue(ipt_fromdd.attribute("ref"));
- todd = model.getValue(ipt_todd.attribute("ref"));
-
- if(reqdeptnm == "합계") {
- reqdeptcd = grd_sumlist.valueMatrix(grd_sumlist.row-1, grd_sumlist.colRef("reqdeptcd"));
- }
- }
-
- setParameter("fromdd", fromdd) ;
- setParameter("todd", todd) ;
- setParameter("goodcd", goodcd);
- setParameter("deptcd", reqdeptcd);
-
- open("SPMNG04200");
-
-
-
- ]]>
- </script>
- </datagrid>
- <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; font-family:돋움체; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; font-family:돋움체; background-color:#fffbf2; border-color:#ffd799; ">.,m</shape>
- <caption id="cap_instcd" class="search_name" style="left:15px; top:10px; width:91px; height:17px; font-family:돋움체; ">조회일자:</caption>
- <line id="line13" class="line_4" style="x1:1055px; y1:5px; x2:1055px; y2:30px; font-family:돋움체; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" navindex="2" style="left:1070px; top:8px; width:56px; height:22px; font-family:돋움체; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSearch();
- ]]>
- </script>
- </button>
- <input id="ipt_fromdd" ref="/root/main/cond/fromdd" inputtype="date" style="left:100px; top:10px; width:85px; height:19px; font-family:돋움체; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- if(model.getValue(rdo_flag.attribute("ref")) == "2") {
- model.setValue(ipt_todd.attribute("ref"), model.getValue(ipt_fromdd.attribute("ref")));
- ipt_todd.refresh();
- }
-
- ]]>
- </script>
- </input>
- <input id="ipt_todd" ref="/root/main/cond/todd" inputtype="date" style="left:195px; top:10px; width:85px; height:19px; font-family:돋움체; "/>
- <caption id="caption1" style="left:185px; top:12px; width:16px; height:18px; font-family:돋움체; font-weight:bold; ">~</caption>
- <select1 id="rdo_deptflag" ref="/root/main/cond/deptflag" appearance="full" cols="4" overflow="visible" style="left:285px; top:11px; width:180px; height:15px; font-family:돋움체; background-color:transparent; border-style:none; ">
- <choices>
- <item>
- <label>전체</label>
- <value/>
- </item>
- <item>
- <label>외래</label>
- <value>O</value>
- </item>
- <item>
- <label>병동</label>
- <value>I</value>
- </item>
- <item>
- <label>행정</label>
- <value>T</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var val = rdo_deptflag.value;
-
- if(val == "" || val == null) {
- cmb_deptcd.choices.itemset.attribute("nodeset") = "/root/init/deptinfo/deptlist";
- } else {
- cmb_deptcd.choices.itemset.attribute("nodeset") = "/root/init/deptinfo/deptlist[deptcd='' or deptflag='" + val + "']";
- cmb_deptcd.value="";
- }
-
-
- cmb_deptcd.refresh();
- ]]>
- </script>
- </select1>
- <select1 id="cmb_deptcd" ref="/root/main/cond/deptcd" appearance="minimal" style="left:470px; top:10px; width:145px; height:19px; font-family:돋움체; ">
- <choices>
- <itemset nodeset="/root/init/deptinfo/deptlist">
- <label ref="deptnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSearch();
- ]]>
- </script>
- </select1>
- <button id="button1" class="btn1_letter2" navindex="2" style="left:1130px; top:8px; width:56px; height:22px; font-family:돋움체; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fileName = window.fileDialog("save", ",", false, "SET기구 처방 집계현황", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
-
- if (fileName != "")
- {
- grd_sumlist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- ]]>
- </script>
- </button>
- <select1 id="rdo_flag" ref="/root/main/cond/flag" appearance="full" cols="2" overflow="visible" style="left:620px; top:10px; width:115px; height:20px; background-color:transparent; ">
- <choices>
- <item>
- <label>일자별</label>
- <value>1</value>
- </item>
- <item>
- <label>부서별</label>
- <value>2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.removeNodeset(grd_sumlist.nodeset);
- grd_sumlist.refresh();
- var flag = model.getValue(rdo_flag.attribute("ref"));
-
- if(flag == "1") {
- grd_sumlist.colHidden(grd_sumlist.colRef("reqdeptnm")) = true;
- grd_sumlist.colHidden(grd_sumlist.colRef("delivedd")) = false;
- ipt_todd.visible = true;
- caption1.visible = true;
- } else {
- ipt_todd.visible = false; //부서별일경우에는 종료일자 숨김.
- model.setValue(ipt_todd.attribute("ref"), model.getValue(ipt_fromdd.attribute("ref")));
- ipt_todd.refresh();
- caption1.visible = false;
- grd_sumlist.colHidden(grd_sumlist.colRef("reqdeptnm")) = false;;
- grd_sumlist.colHidden(grd_sumlist.colRef("delivedd")) = true;
-
- if (!isNull(userdutplcecd)) {
- cmb_deptcd.value = "";
- }
-
- fSearch();
-
- }
- ]]>
- </script>
- </select1>
- </group>
- <caption id="caption8" class="tit_2" style="left:5px; top:59px; width:182px; height:14px; font-family:돋움체; ">SET기구 처방 집계현황</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:74px; x2:1195px; y2:74px; font-family:돋움체; "/>
- <datagrid id="grd_sumlist" nodeset="/root/main/suminfo/sumlist" caption="구분^일자^부서코드^부서명|구분^일자^부서코드^부서명" colsep="^" colwidth="100, 85, 0, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:79px; width:1195px; height:656px; font-family:돋움체; ">
- <col ref="flag" visibility="hidden"/>
- <col ref="delivedd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <col ref="reqdeptnm" style="border-right-color:#000000; "/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
-
- var flag = grd_sumlist.valueMatrix(grd_sumlist.row, grd_sumlist.colRef("flag"));
-
- if(flag == "1") {
-
- return;
- }
-
- var colNm = grd_sumlist.colAttribute(grd_sumlist.col, "ref"); //현재선택한 컬럼의 참조명을 들고온다.
- var col = parseInt(((grd_sumlist.col + 2) % 3));
-
-
- var seq;
-
-
- if(grd_sumlist.col > 2) {
-
- if(col == 0) {
- seq = colNm.substr(5);
- } else if(col == 1) {
- seq = colNm.substr(5);
- } else if(col == 2) {
- seq = colNm.substr(6);
- }
-
- }
-
- //선택한 컬럼의 순번을 가져온다.
-
- var goodcd = model.getValue("/root/init/R0435list/R0435[dispseq='" + seq + "']/cdid");
- var reqdeptcd = grd_sumlist.valueMatrix(grd_sumlist.row, grd_sumlist.colRef("reqdeptcd"));
- var reqdeptnm = grd_sumlist.valueMatrix(grd_sumlist.row, grd_sumlist.colRef("reqdeptnm"));
-
- var fromdd = "";
- var todd = "";
- var delivedd = grd_sumlist.valueMatrix(grd_sumlist.row, grd_sumlist.colRef("delivedd"));
-
- if(col != 1) {
- if(rdo_flag.value == "1") {
-
- if(delivedd = "합계") {
- fromdd = ipt_fromdd.value;
- todd = ipt_todd.value;
- } else {
-
- fromdd = delivedd;
- todd = delivedd;
- }
-
- reqdeptcd = cmb_deptcd.value;
- } else {
-
- fromdd = model.getValue(ipt_fromdd.attribute("ref"));
- todd = model.getValue(ipt_todd.attribute("ref"));
-
- if(reqdeptnm == "합계") {
- reqdeptcd = grd_sumlist.valueMatrix(grd_sumlist.row-1, grd_sumlist.colRef("reqdeptcd"));
- }
- }
-
- setParameter("fromdd", fromdd) ;
- setParameter("todd", todd) ;
- setParameter("goodcd", goodcd);
- setParameter("deptcd", reqdeptcd);
-
- if(col == 0 && grd_sumlist.valueMatrix(grd_sumlist.row, grd_sumlist.col) == "") {
-
- } else {
- open("SPMNG04200");
- }
- }
-
-
-
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var fromdd = model.getValue(ipt_fromdd.attribute("ref"));
- var curdd = getCurrentDate();
-
- var flag = model.getValue(rdo_flag.attribute("ref"));
-
- if(flag == "1") {
- grd_sumlist.isReadOnly(grd_sumlist.row, grd_sumlist.col, grd_sumlist.row, grd_sumlist.col) = true;
- } else {
- if(fromdd != curdd) {
- grd_sumlist.isReadOnly(grd_sumlist.row, grd_sumlist.col, grd_sumlist.row, grd_sumlist.col) = true;
- } else {
- grd_sumlist.isReadOnly(grd_sumlist.row, grd_sumlist.col, grd_sumlist.row, grd_sumlist.col) = false;
- }
- }
- ]]>
- </script>
- </datagrid>
- <button id="btn_sav" class="btn5_letter4" style="left:1129px; top:54px; width:64px; height:19px; ">
- <caption>불출저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var delivedd;
- var reqdeptcd;
- var orgqty;
- var cmpqty;
- var header = "delivedd▦reqdeptcd▦goodcd▦dlvqty▦updtflag▩"
- var data = "";
-
- var updtdata = getGridUpdateData(grd_sumlist);
-
- if(updtdata == null || updtdata == "") {
- messageBox("변경된 내역이 존재하지 않습니다.", "E");
- return;
- }
-
- var updtflag;
-
- //수정된 데이터만 저장하기 위한 로직
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++) {
- delivedd = grd_sumlist.valueMatrix(i, grd_sumlist.colRef("delivedd"));
- reqdeptcd = grd_sumlist.valueMatrix(i, grd_sumlist.colRef("reqdeptcd"));
- updtflag = grd_sumlist.valueMatrix(i, grd_sumlist.colRef("flag"));
-
-
- if(delivedd != "") { //subtotal로 만들어진 데이터인 경우에는. delivedd가 존재하지 않는다.
-
- if(grd_sumlist.rowStatus(i) == "2") { //데이터 수정을 위해 변경한 경우에는. 그리드 상태가 update이다.
-
- //length : 전역변수, set물품 리스트의 건수이다.(건수별로 앞에서 dynamic컬럼으로 생성.)
- //조회시 기존에 가져온 값을 grd_sumlist2에 복사해서 내부적으로 가지고있다.
- for(var j = 1; j <= length; j++) {
- cmpqty= grd_sumlist.valueMatrix(i, grd_sumlist.colRef("a2qty" + j)); //현재 SET기구 현황 조회 그리드의 값
- orgqty = model.getValue(grd_sumlist2.nodeset + "[delivedd='" + delivedd + "' and reqdeptcd='" + reqdeptcd + "']/a2qty" + j); //현재바뀐것도 같은 물품의 원래값.
-
- //두개를 비교해서 다르면.(처음 조회시 가져왔던 정보에서 변경이 되었을 경우에는 저장을 위해 담는다.)
- if(orgqty != cmpqty ) {
-
- data += grd_sumlist.valueMatrix(i, grd_sumlist.colRef("delivedd")) + "▦"
- + grd_sumlist.valueMatrix(i, grd_sumlist.colRef("reqdeptcd")) + "▦"
- + model.getValue("/root/init/R0435list/R0435[dispseq='" + j+ "']/cdid") + "▦"
- + cmpqty + "▦"
- + updtflag + "▩"
- ;
- }
- }
- }
- }
- }
-
- model.makeValue("/root/send/savedata/sumlist", header + data);
-
- submit("TXMNG04201");
-
- fSearch();
- ]]>
- </script>
- </button>
- <caption id="caption2" visibility="hidden" style="left:555px; top:53px; width:532px; height:20px; ">뒤에 새로운 그리드가 숨겨져있음(수정된 내역을 기존과 비교해서 그것만 따로 저장하게 하기위해)</caption>
- <textarea id="tar_hidden" scroll="auto" style="left:0px; top:80px; width:1195px; height:655px; background-color:#eeffee; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|