123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SPLAF00300_물품코드관리.xrw
- * 설 명 : 물품코드 저장 화면
- * 설 계 자 : 한음미
- * 작 성 자 : 한음미
- * 작 성 일 : 2007.08.06
- * 수정이력 :
- * 기 타 :
- -->
- <?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>SPLAF00300_물품코드관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <purccd>
- <purclist>
- <choi/>
- <purccd/>
- <purcnm/>
- <fromdd/>
- <todd/>
- <fstrgstrid/>
- <lastupdtrid/>
- <purcunit/>
- <exchqty/>
- <prodcmpycd/>
- <prodcustnm/>
- <suppcustcd/>
- <suppcustnm/>
- <goodspec/>
- <setunit/>
- </purclist>
- <lastPage>
- <lastPage/>
- </lastPage>
- </purccd>
- <goodcd>
- <goodcdlist>
- <choi/>
- <goodcd/>
- <goodnm/>
- <fromdd/>
- <todd/>
- <fstrgstrid/>
- <lastupdtrid/>
- <existyn/>
- <goodflagcd/>
- <tqty/>
- <tunitcd/>
- <useunitcd/>
- <useqty/>
- </goodcdlist>
- </goodcd>
- </main>
- <send>
- <req/>
- <postdeptcd/>
- <todd/>
- <instcd/>
- <goodcd/>
- <page/>
- <itemlimit>100</itemlimit>
- <seaVal/>
- <seamthdcd/>
- </send>
- <init>
- <sysdt>
- <sysdtinfo>
- <sysdd/>
- <systm/>
- </sysdtinfo>
- </sysdt>
- <codeinfo>
- <R0025>
- <cdid/>
- <cdnm/>
- </R0025>
- </codeinfo>
- <cdid/>
- </init>
- <hidden>
- <item>
- </item>
- <paval>1</paval>
- <seaVal/>
- <seamthdcd>0</seamthdcd>
- </hidden>
- </root>
- </instance>
- <submission id="TRLAF00102" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="/root/main/goodcd/goodcdlist"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fExeInitialize();
- ]]>
- </script>
- <submission id="TRLAF00108" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="/root/main/purccd"/>
- <submission id="TRLPZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/sysdt/sysdtinfo"/>
- <submission id="TXLAF00104" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="/root/message"/>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" replace="instance"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript">
- <![CDATA[
- /* @group : 물품코드관리(팝업)
- * @ver : 2007.07.24 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 메인화면과의 같은 매핑파일 작업으로 생기는 조건 Function
- */
- function fExeInitialize() {
-
- model.makeValue("/root/send/seamthdcd", "2"); // 0:물품코드, 1:물품명
- model.makeValue("/root/send/useflagcd", "0");
- model.makeNode("/root/init/sysdt/sysdtinfo");
- cap_title2.text = getUserInfo("posdeptnm"); // 세션값으로 화면에 화면 부서에 보이기
-
- //-----------------------
- // 물품구분 코드목록 조회
- zbcfGetCodeList( new Array("R0025"), new Array("/root/init/codeinfo") , null, null, null);
- cmb_cdid.refresh();
- model.makeValue("/root/init/cdid", "");
- //-----------------
- fExeGetMISGoods(1); // 구매팀 물품목록 보이기
- submit("TRLAF00102"); // 3개과의 물품목록 보이기
-
- model.refresh();
- }
-
- /* @group : 물품코드관리
- * @ver : 2007.08.06 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 구매팀에서의 물품 저장 Function
- */
- function fExeSave() {
-
- var sNode = "/root/main/goodcd/goodcdlist";
-
-
- //-------------------------
- grd_goodlist.clearStatus();
-
- //--------------------------------------------------------
- for (var irow=1; irow <= getNodesetCount(sNode); irow++) {
- if (model.getValue(sNode+"["+ irow +"]/existyn") != "Y") { // 데이터가 DB에 존재하면 'Y'
- if (model.getValue(sNode+"["+ irow +"]/choi") == "true") { // 선택에 체크가 존재하면 삽입
- grd_goodlist.addStatus(irow,"insert");
- }
- }
- }
-
- //---------------------------------------------------------------
- model.makeValue("/root/send/count",grd_goodlist.getUpdateData());
-
- //-----------
- setAlertOn();
- if(submit("TXLAF00104")) { // 구매팀 물품 목록에서 가져오기
- fExeInitialize();
- }
- }
-
- /* @group : 물품코드관리
- * @ver : 2007.08.06 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 진단검사의학과 물품 목록에서 선택 해제하면 row 삭제 Function
- */
- function fExeUnSelect(){
- if(model.getValue("/root/main/goodcd/goodcdlist["+grd_goodlist.row+"]/choi")=="false"){ // 선택에 체크가 되어 있지 않으면
- if(model.getValue("/root/main/goodcd/goodcdlist["+grd_goodlist.row+"]/existyn")!="Y"){ // 데이터가 DB에 존재하지 않으면 삭제 가능
- grd_goodlist.deleteItem(grd_goodlist.row);
- }
- }
- }
-
- /* @group : 물품코드관리
- * @ver : 2007.08.06 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 구매팀 물품 목록 선택 Function
- */
- function fExeSelect() {
-
- var sNode = "/root/main/purccd/purclist";
- var sDestNode = "/root/main/goodcd/goodcdlist";
-
- //------------------------------------------------------------------
- if (model.getValue(sNode+"["+grd_purclist.row+"]/choi") == "true") {
-
- //----------------------------------------------------------------------------------------------------
- var iNo = grd_goodlist.findRow(model.getValue(sNode+"["+grd_purclist.row+"]/purccd"),1,1,false,false);
- if(iNo < 0) {
- grd_goodlist.addRow();
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/choi", "true");
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/goodcd", model.getValue(sNode+"["+grd_purclist.row+"]/purccd"));
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/goodnm", model.getValue(sNode+"["+grd_purclist.row+"]/purcnm"));
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/fromdd", model.getValue(sNode+"["+grd_purclist.row+"]/fromdd"));
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/todd", model.getValue(sNode+"["+grd_purclist.row+"]/todd"));
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/fstrgstrid", model.getValue(sNode+"["+grd_purclist.row+"]/fstrgstrid"));
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/lastupdtrid", model.getValue(sNode+"["+grd_purclist.row+"]/lastupdtrid"));
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/useunitcd", model.getValue(sNode+"["+grd_purclist.row+"]/purcunit"));
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/useqty", model.getValue(sNode+"["+grd_purclist.row+"]/exchqty"));
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/tqty", "1");
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/tunitcd", "-");
- model.setValue(sDestNode+"["+grd_goodlist.row+"]/goodflagcd", 0);
- grd_goodlist.toprow = grd_goodlist.rows-1;
-
- } else {
- messageBox("데이터가","E006");
- }
-
- //--------------------------------------------------------------------------------
- model.setValue("/root/main/purccd/purclist["+ grd_purclist.row +"]/choi","false");
- }
- }
- /* @group : 물품코드관리(팝업)
- * @ver : 2007.07.24 (CMCDEV-0001)
- * @by : 한음미
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 구매팀 물류 정보 보기
- */
- function fExeGetMISGoods(page) {
-
- // 이상 페이지 번호 처리
- if(page == '') page = 1;
- if(page < 1) page = 1;
- if(page > parseInt(cap_lastPage.value)) page = Number(cap_lastPage.value);
-
- //----------------------------------------------------------------------------
- model.makeValue("/root/send/seaVal", model.getValue("root/hidden/seaVal"));
- model.makeValue("/root/send/seamthdcd", model.getValue("root/hidden/seamthdcd"));
- model.makeValue("/root/send/page", page);
- model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
- model.makeValue("/root/send/goodflag", model.getValue("/root/init/cdid"));
-
- submit("TRLAF00108"); // 구매팀 물품목록 보이기
-
- //---------------------
- ipt_paval.value = page;
- }
- /* @group : 물품코드관리(팝업)
- * @ver : 2008.04.15 (CMCDEV-0001)
- * @by : 유동철
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 물품코드/품명 검색어 입력 시 처리
- */
- function fExeGoodKeyPress() {
- if (event.keyCode == 13) {
- model.setValue("root/hidden/seaVal", ipt_seaVal.currentText);
- ipt_seaVal.refresh();
- fExeGetMISGoods(1);
- }
- }
-
- /* @group : 물품코드관리(팝업)
- * @ver : 2008.04.15 (CMCDEV-0001)
- * @by : 유동철
- * @-----------------------------------
- * @type : function
- * @access : public
- * @desc : 검색 페이지번호 입력 시 처리
- */
- function fExePageKeyPress() {
-
- if(event.keyCode == '13' && ipt_paval.currentText != ipt_paval.value){
- model.setValue("/root/hidden/paval", ipt_paval.currentText);
- ipt_paval.dispatch("xforms-value-changed");
- }
- else if(event.keyCode != 8 && (event.keyCode < 48 || event.keyCode > 57)) {
- event.defaultAction = "cancel";
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1045" pageheight="818" guideline="1,1194;" style="top:0; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group2" style="left:0px; top:0px; width:1027px; height:770px; ">
- <datagrid id="grd_goodlist" nodeset="/root/main/goodcd/goodcdlist" scroll="auto" autoresize="true" caption="선택^물품코드^물품명^시작일자^종료일자^처음ID^종료ID^유무^물품구분^T수량^T단위^환산단위^환산수량" colsep="^" colwidth="40, 80,200,0,0,0,0,0,0,0,0,0,0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:685px; top:42px; width:342px; height:727px; ">
- <col ref="choi" type="checkbox"/>
- <col ref="goodcd"/>
- <col ref="goodnm"/>
- <col ref="fromdd"/>
- <col ref="todd"/>
- <col ref="fstrgstrid"/>
- <col ref="lastupdtrid"/>
- <col ref="existyn"/>
- <col ref="goodflagcd"/>
- <col ref="tqty"/>
- <col ref="tunitcd"/>
- <col ref="useunitcd"/>
- <col ref="useqty"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fExeUnSelect();
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_goodlist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <line id="line12" class="line_1" style="x1:5px; y1:37px; x2:683px; y2:37px; "/>
- <caption id="caption1" class="tit_2" style="left:13; top:18; width:118px; height:13px; ">구매팀 물품 목록</caption>
- <line id="line1" class="line_1" style="x1:685px; y1:37px; x2:1027px; y2:37px; "/>
- <choices>
- <item>
- <label>checkbox1</label>
- <value>checkbox1</value>
- </item>
- </choices>
- <datagrid id="grd_purclist" nodeset="/root/main/purccd/purclist" class="datagrid2" scroll="auto" autoresize="true" caption="선
택^물품코드^물품명^시작일자^종료일자^처음ID^종료ID^환산단위^환산수량^prodcmpycd^제조사^suppcustcd^모델^납품처^규격^포장구성단위" colsep="^" colwidth="30, 80, 185, 0, 0, 0, 0, 0, 0, 0, 70, 0, 70, 70, 70, 80" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:42px; width:678px; height:727px; ">
- <col ref="choi" type="checkbox"/>
- <col ref="purccd"/>
- <col ref="purcnm"/>
- <col ref="fromdd"/>
- <col ref="todd"/>
- <col ref="fstrgstrid"/>
- <col ref="lastupdtrid"/>
- <col ref="purcunit"/>
- <col ref="exchqty"/>
- <col ref="prodcmpycd"/>
- <col ref="prodcustnm"/>
- <col ref="suppcustcd"/>
- <col ref="model"/>
- <col ref="suppcustnm"/>
- <col ref="goodspec"/>
- <col class="text_center" ref="setunit"/>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- fExeSelect();
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_purclist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <caption id="caption2" class="tit_1" style="left:5px; top:0px; width:140px; height:13px; ">물품코드관리</caption>
- <caption id="cap_title2" class="tit_2" style="left:690px; top:21px; width:110px; height:13px; "/>
- <caption id="caption3" visibility="hidden" style="left:740px; top:5px; width:115px; height:15px; border-color:#333300; border-style:solid; "/>
- <input id="ipt_seaVal" ref="/root/hidden/seaVal" class="input_search" style="left:553px; top:17px; width:130px; height:19px; text-align:right; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- fExeGoodKeyPress();
- ]]>
- </script>
- </input>
- <select1 id="rdo_seamthdcd" ref="/root/hidden/seamthdcd" overflow="visible" appearance="full" cols="2" style="left:458px; top:17px; width:95px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>코드</label>
- <value>0</value>
- </item>
- <item>
- <label>품명</label>
- <value>1</value>
- </item>
- </choices>
- </select1>
- <select1 id="cmb_cdid" ref="/root/init/cdid" appearance="minimal" style="left:325px; top:17px; width:130px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/codeinfo/R0025">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fExeGetMISGoods(1);
- ]]>
- </script>
- </select1>
- </group>
- <group id="group3" style="left:0px; top:770px; width:1027px; height:30px; ">
- <button id="button3" class="btn4_letter2" style="left:969px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeSave();
- ]]>
- </script>
- </button>
- <input id="ipt_paval" ref="/root/hidden/paval" class="input_search" style="left:260px; top:5px; width:65px; height:19px; text-align:right; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fExeGetMISGoods(model.getValue("/root/hidden/paval"));
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- fExePageKeyPress();
- ]]>
- </script>
- </input>
- <caption id="cap_lastPage" ref="/root/main/purccd/lastPage/lastPage" style="left:355px; top:5px; width:60px; height:20px; font-size:9pt; font-weight:bold; border-width:1px; border-style:solid; ">1</caption>
- <caption id="caption4" style="left:337px; top:5px; width:11px; height:20px; font-size:9pt; font-weight:bold; ">/</caption>
- <button id="btn_prntexcel" class="btn3_letter2" style="left:61px; top:4px; width:56px; height:22px; ">
- <caption>이전</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeGetMISGoods(parseInt(model.getValue("/root/hidden/paval")) - 1);
- ]]>
- </script>
- </button>
- <button id="button1" class="btn4_letter2" style="left:565px; top:5px; width:56px; height:22px; ">
- <caption>다음</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeGetMISGoods(parseInt(model.getValue("/root/hidden/paval")) + 1);
- ]]>
- </script>
- </button>
- <button id="button2" class="btn3_letter2" style="left:2px; top:4px; width:56px; height:22px; ">
- <caption>처음</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeGetMISGoods(1);
- ]]>
- </script>
- </button>
- <button id="button4" class="btn4_letter2" style="left:624px; top:5px; width:56px; height:22px; ">
- <caption>최종</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeGetMISGoods(model.getValue("root/main/purccd/lastPage/lastPage"));
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|