123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372 |
- <?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>물품Excel 일괄등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <code/>
- <cdnm/>
- </main>
- <target>
- <defaultvalue>
- <title/>
- <cond/>
- <submitid/>
- <instcd/>
- <format/>
- <goodflag/>
- <lrgcd/>
- <mdlcd/>
- <smlcd/>
- </defaultvalue>
- </target>
- <init>
- <title/>
- <cond>
- </cond>
- <submitid/>
- <instcd/>
- <format/>
- <inputcmb/>
- <goodflag/>
- <lrgcd/>
- <mdlcd/>
- <smlcd/>
- <cmb_goodflag/>
- </init>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- /*
- if (checkOpener())
- {
- window.width
- }
- */
- //화면 Control을 초기화한다
- fInitialize();
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript">
- <![CDATA[
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
-
- model.resetInstanceNode("/root/init");
-
- model.setValue("/root/init/title", model.getValue(PURTARGET_NODE + "/title"));
- model.setValue("/root/init/cond", model.getValue(PURTARGET_NODE + "/cond"));
- model.setValue("/root/init/instcd", model.getValue(PURTARGET_NODE + "/instcd"));
- model.setValue("/root/init/format", model.getValue(PURTARGET_NODE + "/format"));
-
- switch1.selectedIndex = 0;
- if(model.getValue("/root/init/cond") == "custom" || model.getValue("/root/init/cond") == "prodcmpy")
- {
- ipt_input.attribute("style" ) = "left:0px; top:5px; width:105px; height:19px; ";
- opt_input.attribute("style" ) = "left:124px; top:5px; width:175px; height:19px; ";
- btn_input.attribute("visibility") = "visible";
- opt_input.attribute("visibility") = "visible";
- cmb_input.attribute("visibility") = "hidden";
- }
- else if(model.getValue("/root/init/cond") == "purcunit")
- {
- btn_input.attribute("visibility") = "hidden";
- opt_input.attribute("visibility") = "hidden";
- cmb_input.attribute("visibility") = "visible";
- misfComboComCdListMulti("R0032","cmb_input");
- if(cmb_input.length> 0) cmb_input.selectedindex= 0;
- }
- else if(model.getValue("/root/init/cond") == "deliveunit")
- {
- btn_input.attribute("visibility") = "hidden";
- opt_input.attribute("visibility") = "hidden";
- cmb_input.attribute("visibility") = "visible";
- misfComboComCdListMulti("R0039","cmb_input");
- if(cmb_input.length> 0) cmb_input.selectedindex= 0;
- }
- else if(model.getValue("/root/init/cond") == "lrgnm") {
- switch1.selectedIndex = 1;
- misfComboComCdListMulti("R0025","cmb_goodflag");
- model.setValue(cmb_goodflag.attribute("ref"), model.getValue(PURTARGET_NODE + "/goodflag"));
- rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, "", "cmb_lrgcd", "", "L"); /* 대분류 List 셋팅 */
- if( model.getValue(PURTARGET_NODE + "/lrgcd") != "" || model.getValue(PURTARGET_NODE + "/lrgcd") != null ) /* Main에서 대분류 값을 넘길 경우 List 선택 */
- model.setValue( cmb_lrgcd.attribute("ref"), model.getValue(PURTARGET_NODE + "/lrgcd"));
- if (cmb_lrgcd.length > 0 && cmb_lrgcd.value != "" && cmb_lrgcd.value !=null ) /* 중분류 List 셋팅 */
- {
- rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, "", "cmb_mdlcd", "", "M");
-
- if( model.getValue(PURTARGET_NODE + "/mdlcd") != "" || model.getValue(PURTARGET_NODE + "/mdlcd") != null ) /* Main에서 중분류 값을 넘길 경우 List 선택 */
- model.setValue( cmb_mdlcd.attribute("ref"), model.getValue(PURTARGET_NODE + "/mdlcd"));
- }
-
- if (cmb_mdlcd.length > 0 && cmb_mdlcd.value != "" && cmb_mdlcd.value !=null ) /* 소분류 List 셋팅 */
- {
- rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, cmb_mdlcd.value, "cmb_smlcd", "", "S");
-
- if( model.getValue(PURTARGET_NODE + "/smlcd") != "" || model.getValue(PURTARGET_NODE + "/smlcd") != null ) /* Main에서 소분류 값을 넘길 경우 List 선택 */
- model.setValue( cmb_smlcd.attribute("ref"), model.getValue(PURTARGET_NODE + "/smlcd"));
- }
- model.refresh();
- }
- else
- {
- switch1.selectedIndex = 0;
- ipt_input.attribute("style" ) = "left:0px; top:5px; width:299px; height:19px; ";
- btn_input.attribute("visibility") = "hidden";
- opt_input.attribute("visibility") = "hidden";
- cmb_input.attribute("visibility") = "hidden";
- }
-
- if(model.getValue("/root/init/format").length> 0)ipt_input.attribute("format") = model.getValue("/root/init/format")
- model.refresh();
-
- model.setFocus("ipt_input");
- }
- String.prototype.trim = function()
- {
- return this.replace(/(^\s*)|(\s*$)/g, "");
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="330" pageheight="160" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <caption id="ipt_title" ref="/root/init/title" class="tit_2" style="left:3px; top:5px; width:297px; height:13px; "/>
- <line id="line1" class="line_1" style="x1:0px; y1:21px; x2:299px; y2:21px; "/>
- <output id="opt_instcd" ref="/root/init/instcd" visibility="hidden" style="left:245px; top:5px; width:10px; height:19px; "/>
- <output id="opt_goodflag" ref="/root/init/goodflag" visibility="hidden" style="left:255px; top:5px; width:10px; height:19px; "/>
- <switch id="switch1" style="left:0px; top:30px; width:305px; height:105px; ">
- <case id="case1" style="left:0px; top:0px; width:303px; height:103px; ">
- <input id="ipt_input" ref="/root/main/code" style="left:0px; top:5px; width:105px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(model.getValue("/root/init/cond") == "custom")
- {
- rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm", model.getValue(opt_instcd.attribute("ref")) +",," + model.getValue(ipt_input.attribute("ref")),"","code,cdnm" ,ipt_input,"SPRSD00220","instcd","opt_instcd");
- model.refresh();
- }
- else if(model.getValue("/root/init/cond") == "prodcmpy")
- {
- rszfValidationCheck("TRRSD00161", "prodcmpylist", "refcond,prodcmpycd,prodcmpynm","prodcmpynm,," + model.getValue(ipt_input.attribute("ref")) ,"","code,cdnm" ,ipt_input,"SPRSD00160","","");
- model.refresh();
- }
- ]]>
- </script>
- </input>
- <output id="opt_input" ref="/root/main/cdnm" class="output_fix" visibility="visible" appearance="output" style="left:124px; top:5px; width:175px; height:19px; "/>
- <button id="btn_input" class="icon_search" visibility="visible" style="left:107px; top:6px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/init/cond") == "custom")rszfOpenPopUpListByWndName(ipt_input,"","code,cdnm","SPRSD00220","instcd","opt_instcd");
- else if(model.getValue("/root/init/cond") == "prodcmpy")rszfOpenPopUpListByWndName(ipt_input,"","code,cdnm","SPRSD00160","","");
- model.refresh();
- ]]>
- </script>
- </button>
- <select1 id="cmb_input" ref="/root/init/inputcmb" class="combo_search" appearance="minimal" style="left:0px; top:5px; width:300px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/inputcmb">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <group id="group1" scroll="auto" style="left:0px; top:25px; width:299px; height:27px; ">
- <button id="btn_confirm" class="btn4_letter2" style="left:186px; top:2px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/init/cond") == "purcunit" || model.getValue("/root/init/cond") == "deliveunit")
- {
- if(cmb_input.value.length == 0)
- {
- messageBox("코드를" ,"C001");
- model.setFocus("ipt_input");
- return;
- }
- }
- else
- {
- if(ipt_input.value.length == 0)
- {
- messageBox("코드를" ,"C001");
- model.setFocus("ipt_input");
- return;
- }
-
- }
-
- var path = model.getValue(PURTARGET_NODE + "/returnnode");
- if(path.length == 0)path = "/root/init/popinputcd";
-
- if (checkOpener())
- {
- if(model.getValue("/root/init/cond") == "custom" || model.getValue("/root/init/cond") == "prodcmpy")opener.model.setValue(path,ipt_input.value + "," + opt_input.value);
- else if(model.getValue("/root/init/cond") == "purcunit" || model.getValue("/root/init/cond") == "deliveunit")opener.model.setValue(path,cmb_input.value);
- else opener.model.setValue(path,ipt_input.value);
-
- window.close();
- }
- else messageBox("상위 화면이 변경되어 데이터를 전달", "E001");
- ]]>
- </script>
- </button>
- <button id="btn_cancel" class="btn4_letter2" style="left:242px; top:2px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var path = model.getValue(PURTARGET_NODE + "/returnnode");
- if(path.length == 0)path = "/root/init/popinputcd";
-
- if (checkOpener())opener.model.setValue(path,"");
- window.close();
- ]]>
- </script>
- </button>
- <line id="line2" class="line_6" style="x1:0px; y1:0px; x2:299px; y2:0px; "/>
- </group>
- </case>
- <case id="case2" selected="true" style="left:0px; top:0px; width:303px; height:103px; ">
- <caption id="cap_lrgcd" class="search_name" style="left:2px; top:5px; width:80px; height:19px; ">대분류 :</caption>
- <select1 id="cmb_lrgcd" ref="/root/init/lrgcd" class="combo_search" appearance="minimal" style="left:80px; top:5px; width:220px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/inputlrgcmb">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, "", "cmb_mdlcd", "", "M");
- cmb_mdlcd.dispatch("xforms-value-changed");
- model.refresh();
- ]]>
- </script>
- </select1>
- <caption id="cap_mdlcd" class="search_name" style="left:2px; top:30px; width:80px; height:19px; ">중분류 :</caption>
- <select1 id="cmb_mdlcd" ref="/root/init/mdlcd" class="combo_search" appearance="minimal" style="left:80px; top:30px; width:220px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/inputmdlcmb">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, cmb_mdlcd.value, "cmb_smlcd", "", "S");
- model.refresh();
- ]]>
- </script>
- </select1>
- <caption id="cap_smlcd" class="search_name" style="left:2px; top:55px; width:80px; height:19px; ">소분류 :</caption>
- <select1 id="cmb_smlcd" ref="/root/init/smlcd" class="combo_search" appearance="minimal" style="left:80px; top:55px; width:220px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/inputsmlcmb">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <group id="group2" scroll="auto" style="left:0px; top:75px; width:299px; height:27px; ">
- <button id="btn_confirm2" class="btn4_letter2" style="left:186px; top:2px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/init/cond") == "lrgnm" || model.getValue("/root/init/cond") == "mdlnm" || model.getValue("/root/init/cond") == "smlnm")
- {
- if(cmb_lrgcd.value.length == 0)
- {
- messageBox("대분류 코드를" ,"C001");
- model.setFocus("cmb_lrgcd");
- return;
- }
- if(cmb_mdlcd.value.length == 0)
- {
- messageBox("중분류 코드를" ,"C001");
- model.setFocus("cmb_mdlcd");
- return;
- }
- }
- var path = model.getValue(PURTARGET_NODE + "/returnnode");
- if(path.length == 0)path = "/root/init/popinputcd";
-
- if (checkOpener())
- {
- if(model.getValue("/root/init/cond") == "lrgnm" || model.getValue("/root/init/cond") == "mdlnm" || model.getValue("/root/init/cond") == "smlnm" ) {
- // 2008.07.30 [YYJ] 대 / 중 / 소분류 명칭을 쿼리에서 "코드" + " : " + "명칭" 조합으로 뿌려줌에 따라
- // 변경처리함.. trim() 함수 상위 구현
- // 대/중/소 분류 구하는 스크립트를 수정처리 하였으나... 혹시 의도하지 않게 사용 할 수 있어
- // if / else로 처리 구문이 존재하여 유지함
- var lrgLabel = cmb_lrgcd.label.split(" : ");
- var mdlLabel = cmb_mdlcd.label.split(" : ");
- var smlLabel = cmb_smlcd.label.split(" : ");
-
- if ( lrgLabel.length > 1 )
- opener.model.setValue(path,cmb_lrgcd.value + "," + lrgLabel[1].trim() + "," + cmb_mdlcd.value + "," + mdlLabel[1].trim() + "," + cmb_smlcd.value + "," + smlLabel[1].trim() );
- else
- opener.model.setValue(path,cmb_lrgcd.value + "," + lrgLabel + "," + cmb_mdlcd.value + "," + mdlLabel + "," + cmb_smlcd.value + "," + smlLabel );
- }
- else opener.model.setValue(path,ipt_input.value);
-
- window.close();
- }
- else messageBox("상위 화면이 변경되어 데이터를 전달", "E001");
- ]]>
- </script>
- </button>
- <button id="btn_cancel2" class="btn4_letter2" style="left:242px; top:2px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var path = model.getValue(PURTARGET_NODE + "/returnnode");
- if(path.length == 0)path = "/root/init/popinputcd";
-
- if (checkOpener())opener.model.setValue(path,"");
- window.close();
- ]]>
- </script>
- </button>
- <line id="line3" class="line_6" style="x1:0px; y1:0px; x2:299px; y2:0px; "/>
- <caption id="caption1" class="search_name" style="left:2px; top:5px; width:80px; height:19px; ">물품구분</caption>
- <select1 id="cmb_goodflag" ref="/root/init/cmb_goodflag" class="combo_search" disabled="true" appearance="minimal" style="left:81px; top:3px; width:89px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/cmb_goodflag">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- rszfLMSComboList(model.getValue("/root/init/goodflag"), cmb_lrgcd.value, "", "cmb_mdlcd", "", "M");
- if (cmb_mdlcd.length > 0 && cmb_mdlcd.value != "" && cmb_mdlcd.value !=null )
- {
- cmb_mdlcd.dispatch("xforms-value-changed");
- }
- model.refresh();
- ]]>
- </script>
- </select1>
- </group>
- </case>
- </switch>
- </xhtml:body>
- </xhtml:html>
|