SMRSC03801_물품코드ExcelHELP.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>물품Excel 일괄등록</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <code/>
  11. <cdnm/>
  12. </main>
  13. <target>
  14. <defaultvalue>
  15. <title/>
  16. <cond/>
  17. <submitid/>
  18. <instcd/>
  19. <format/>
  20. <goodflag/>
  21. <lrgcd/>
  22. <mdlcd/>
  23. <smlcd/>
  24. </defaultvalue>
  25. </target>
  26. <init>
  27. <title/>
  28. <cond>
  29. </cond>
  30. <submitid/>
  31. <instcd/>
  32. <format/>
  33. <inputcmb/>
  34. <goodflag/>
  35. <lrgcd/>
  36. <mdlcd/>
  37. <smlcd/>
  38. <cmb_goodflag/>
  39. </init>
  40. </root>
  41. </instance>
  42. <script type="javascript" ev:event="xforms-ready">
  43. <![CDATA[
  44. /*
  45. if (checkOpener())
  46. {
  47. window.width
  48. }
  49. */
  50. //화면 Control을 초기화한다
  51. fInitialize();
  52. ]]>
  53. </script>
  54. </model>
  55. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  56. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  57. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  58. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  60. <script type="javascript">
  61. <![CDATA[
  62. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  63. function fInitialize() {
  64. model.resetInstanceNode("/root/init");
  65. model.setValue("/root/init/title", model.getValue(PURTARGET_NODE + "/title"));
  66. model.setValue("/root/init/cond", model.getValue(PURTARGET_NODE + "/cond"));
  67. model.setValue("/root/init/instcd", model.getValue(PURTARGET_NODE + "/instcd"));
  68. model.setValue("/root/init/format", model.getValue(PURTARGET_NODE + "/format"));
  69. switch1.selectedIndex = 0;
  70. if(model.getValue("/root/init/cond") == "custom" || model.getValue("/root/init/cond") == "prodcmpy")
  71. {
  72. ipt_input.attribute("style" ) = "left:0px; top:5px; width:105px; height:19px; ";
  73. opt_input.attribute("style" ) = "left:124px; top:5px; width:175px; height:19px; ";
  74. btn_input.attribute("visibility") = "visible";
  75. opt_input.attribute("visibility") = "visible";
  76. cmb_input.attribute("visibility") = "hidden";
  77. }
  78. else if(model.getValue("/root/init/cond") == "purcunit")
  79. {
  80. btn_input.attribute("visibility") = "hidden";
  81. opt_input.attribute("visibility") = "hidden";
  82. cmb_input.attribute("visibility") = "visible";
  83. misfComboComCdListMulti("R0032","cmb_input");
  84. if(cmb_input.length> 0) cmb_input.selectedindex= 0;
  85. }
  86. else if(model.getValue("/root/init/cond") == "deliveunit")
  87. {
  88. btn_input.attribute("visibility") = "hidden";
  89. opt_input.attribute("visibility") = "hidden";
  90. cmb_input.attribute("visibility") = "visible";
  91. misfComboComCdListMulti("R0039","cmb_input");
  92. if(cmb_input.length> 0) cmb_input.selectedindex= 0;
  93. }
  94. else if(model.getValue("/root/init/cond") == "lrgnm") {
  95. switch1.selectedIndex = 1;
  96. misfComboComCdListMulti("R0025","cmb_goodflag");
  97. model.setValue(cmb_goodflag.attribute("ref"), model.getValue(PURTARGET_NODE + "/goodflag"));
  98. rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, "", "cmb_lrgcd", "", "L"); /* 대분류 List 셋팅 */
  99. if( model.getValue(PURTARGET_NODE + "/lrgcd") != "" || model.getValue(PURTARGET_NODE + "/lrgcd") != null ) /* Main에서 대분류 값을 넘길 경우 List 선택 */
  100. model.setValue( cmb_lrgcd.attribute("ref"), model.getValue(PURTARGET_NODE + "/lrgcd"));
  101. if (cmb_lrgcd.length > 0 && cmb_lrgcd.value != "" && cmb_lrgcd.value !=null ) /* 중분류 List 셋팅 */
  102. {
  103. rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, "", "cmb_mdlcd", "", "M");
  104. if( model.getValue(PURTARGET_NODE + "/mdlcd") != "" || model.getValue(PURTARGET_NODE + "/mdlcd") != null ) /* Main에서 중분류 값을 넘길 경우 List 선택 */
  105. model.setValue( cmb_mdlcd.attribute("ref"), model.getValue(PURTARGET_NODE + "/mdlcd"));
  106. }
  107. if (cmb_mdlcd.length > 0 && cmb_mdlcd.value != "" && cmb_mdlcd.value !=null ) /* 소분류 List 셋팅 */
  108. {
  109. rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, cmb_mdlcd.value, "cmb_smlcd", "", "S");
  110. if( model.getValue(PURTARGET_NODE + "/smlcd") != "" || model.getValue(PURTARGET_NODE + "/smlcd") != null ) /* Main에서 소분류 값을 넘길 경우 List 선택 */
  111. model.setValue( cmb_smlcd.attribute("ref"), model.getValue(PURTARGET_NODE + "/smlcd"));
  112. }
  113. model.refresh();
  114. }
  115. else
  116. {
  117. switch1.selectedIndex = 0;
  118. ipt_input.attribute("style" ) = "left:0px; top:5px; width:299px; height:19px; ";
  119. btn_input.attribute("visibility") = "hidden";
  120. opt_input.attribute("visibility") = "hidden";
  121. cmb_input.attribute("visibility") = "hidden";
  122. }
  123. if(model.getValue("/root/init/format").length> 0)ipt_input.attribute("format") = model.getValue("/root/init/format")
  124. model.refresh();
  125. model.setFocus("ipt_input");
  126. }
  127. String.prototype.trim = function()
  128. {
  129. return this.replace(/(^\s*)|(\s*$)/g, "");
  130. }
  131. ]]>
  132. </script>
  133. </xhtml:head>
  134. <xhtml:body pagewidth="330" pageheight="160" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  135. <caption id="ipt_title" ref="/root/init/title" class="tit_2" style="left:3px; top:5px; width:297px; height:13px; "/>
  136. <line id="line1" class="line_1" style="x1:0px; y1:21px; x2:299px; y2:21px; "/>
  137. <output id="opt_instcd" ref="/root/init/instcd" visibility="hidden" style="left:245px; top:5px; width:10px; height:19px; "/>
  138. <output id="opt_goodflag" ref="/root/init/goodflag" visibility="hidden" style="left:255px; top:5px; width:10px; height:19px; "/>
  139. <switch id="switch1" style="left:0px; top:30px; width:305px; height:105px; ">
  140. <case id="case1" style="left:0px; top:0px; width:303px; height:103px; ">
  141. <input id="ipt_input" ref="/root/main/code" style="left:0px; top:5px; width:105px; height:19px; ">
  142. <script type="javascript" ev:event="xforms-value-changed">
  143. <![CDATA[
  144. if(model.getValue("/root/init/cond") == "custom")
  145. {
  146. 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");
  147. model.refresh();
  148. }
  149. else if(model.getValue("/root/init/cond") == "prodcmpy")
  150. {
  151. rszfValidationCheck("TRRSD00161", "prodcmpylist", "refcond,prodcmpycd,prodcmpynm","prodcmpynm,," + model.getValue(ipt_input.attribute("ref")) ,"","code,cdnm" ,ipt_input,"SPRSD00160","","");
  152. model.refresh();
  153. }
  154. ]]>
  155. </script>
  156. </input>
  157. <output id="opt_input" ref="/root/main/cdnm" class="output_fix" visibility="visible" appearance="output" style="left:124px; top:5px; width:175px; height:19px; "/>
  158. <button id="btn_input" class="icon_search" visibility="visible" style="left:107px; top:6px; width:16px; height:16px; ">
  159. <caption/>
  160. <script type="javascript" ev:event="DOMActivate">
  161. <![CDATA[
  162. if(model.getValue("/root/init/cond") == "custom")rszfOpenPopUpListByWndName(ipt_input,"","code,cdnm","SPRSD00220","instcd","opt_instcd");
  163. else if(model.getValue("/root/init/cond") == "prodcmpy")rszfOpenPopUpListByWndName(ipt_input,"","code,cdnm","SPRSD00160","","");
  164. model.refresh();
  165. ]]>
  166. </script>
  167. </button>
  168. <select1 id="cmb_input" ref="/root/init/inputcmb" class="combo_search" appearance="minimal" style="left:0px; top:5px; width:300px; height:19px; ">
  169. <choices>
  170. <itemset nodeset="/root/init/inputcmb">
  171. <label ref="cdnm"/>
  172. <value ref="cdid"/>
  173. </itemset>
  174. </choices>
  175. </select1>
  176. <group id="group1" scroll="auto" style="left:0px; top:25px; width:299px; height:27px; ">
  177. <button id="btn_confirm" class="btn4_letter2" style="left:186px; top:2px; width:56px; height:22px; ">
  178. <caption>확인</caption>
  179. <script type="javascript" ev:event="DOMActivate">
  180. <![CDATA[
  181. if(model.getValue("/root/init/cond") == "purcunit" || model.getValue("/root/init/cond") == "deliveunit")
  182. {
  183. if(cmb_input.value.length == 0)
  184. {
  185. messageBox("코드를" ,"C001");
  186. model.setFocus("ipt_input");
  187. return;
  188. }
  189. }
  190. else
  191. {
  192. if(ipt_input.value.length == 0)
  193. {
  194. messageBox("코드를" ,"C001");
  195. model.setFocus("ipt_input");
  196. return;
  197. }
  198. }
  199. var path = model.getValue(PURTARGET_NODE + "/returnnode");
  200. if(path.length == 0)path = "/root/init/popinputcd";
  201. if (checkOpener())
  202. {
  203. if(model.getValue("/root/init/cond") == "custom" || model.getValue("/root/init/cond") == "prodcmpy")opener.model.setValue(path,ipt_input.value + "," + opt_input.value);
  204. else if(model.getValue("/root/init/cond") == "purcunit" || model.getValue("/root/init/cond") == "deliveunit")opener.model.setValue(path,cmb_input.value);
  205. else opener.model.setValue(path,ipt_input.value);
  206. window.close();
  207. }
  208. else messageBox("상위 화면이 변경되어 데이터를 전달", "E001");
  209. ]]>
  210. </script>
  211. </button>
  212. <button id="btn_cancel" class="btn4_letter2" style="left:242px; top:2px; width:56px; height:22px; ">
  213. <caption>취소</caption>
  214. <script type="javascript" ev:event="DOMActivate">
  215. <![CDATA[
  216. var path = model.getValue(PURTARGET_NODE + "/returnnode");
  217. if(path.length == 0)path = "/root/init/popinputcd";
  218. if (checkOpener())opener.model.setValue(path,"");
  219. window.close();
  220. ]]>
  221. </script>
  222. </button>
  223. <line id="line2" class="line_6" style="x1:0px; y1:0px; x2:299px; y2:0px; "/>
  224. </group>
  225. </case>
  226. <case id="case2" selected="true" style="left:0px; top:0px; width:303px; height:103px; ">
  227. <caption id="cap_lrgcd" class="search_name" style="left:2px; top:5px; width:80px; height:19px; ">대분류 :</caption>
  228. <select1 id="cmb_lrgcd" ref="/root/init/lrgcd" class="combo_search" appearance="minimal" style="left:80px; top:5px; width:220px; height:19px; ">
  229. <choices>
  230. <itemset nodeset="/root/init/inputlrgcmb">
  231. <label ref="cdnm"/>
  232. <value ref="cdid"/>
  233. </itemset>
  234. </choices>
  235. <script type="javascript" ev:event="xforms-value-changed">
  236. <![CDATA[
  237. rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, "", "cmb_mdlcd", "", "M");
  238. cmb_mdlcd.dispatch("xforms-value-changed");
  239. model.refresh();
  240. ]]>
  241. </script>
  242. </select1>
  243. <caption id="cap_mdlcd" class="search_name" style="left:2px; top:30px; width:80px; height:19px; ">중분류 :</caption>
  244. <select1 id="cmb_mdlcd" ref="/root/init/mdlcd" class="combo_search" appearance="minimal" style="left:80px; top:30px; width:220px; height:19px; ">
  245. <choices>
  246. <itemset nodeset="/root/init/inputmdlcmb">
  247. <label ref="cdnm"/>
  248. <value ref="cdid"/>
  249. </itemset>
  250. </choices>
  251. <script type="javascript" ev:event="xforms-value-changed">
  252. <![CDATA[
  253. rszfLMSComboList( model.getValue(cmb_goodflag.attribute("ref")), cmb_lrgcd.value, cmb_mdlcd.value, "cmb_smlcd", "", "S");
  254. model.refresh();
  255. ]]>
  256. </script>
  257. </select1>
  258. <caption id="cap_smlcd" class="search_name" style="left:2px; top:55px; width:80px; height:19px; ">소분류 :</caption>
  259. <select1 id="cmb_smlcd" ref="/root/init/smlcd" class="combo_search" appearance="minimal" style="left:80px; top:55px; width:220px; height:19px; ">
  260. <choices>
  261. <itemset nodeset="/root/init/inputsmlcmb">
  262. <label ref="cdnm"/>
  263. <value ref="cdid"/>
  264. </itemset>
  265. </choices>
  266. </select1>
  267. <group id="group2" scroll="auto" style="left:0px; top:75px; width:299px; height:27px; ">
  268. <button id="btn_confirm2" class="btn4_letter2" style="left:186px; top:2px; width:56px; height:22px; ">
  269. <caption>확인</caption>
  270. <script type="javascript" ev:event="DOMActivate">
  271. <![CDATA[
  272. if(model.getValue("/root/init/cond") == "lrgnm" || model.getValue("/root/init/cond") == "mdlnm" || model.getValue("/root/init/cond") == "smlnm")
  273. {
  274. if(cmb_lrgcd.value.length == 0)
  275. {
  276. messageBox("대분류 코드를" ,"C001");
  277. model.setFocus("cmb_lrgcd");
  278. return;
  279. }
  280. if(cmb_mdlcd.value.length == 0)
  281. {
  282. messageBox("중분류 코드를" ,"C001");
  283. model.setFocus("cmb_mdlcd");
  284. return;
  285. }
  286. }
  287. var path = model.getValue(PURTARGET_NODE + "/returnnode");
  288. if(path.length == 0)path = "/root/init/popinputcd";
  289. if (checkOpener())
  290. {
  291. if(model.getValue("/root/init/cond") == "lrgnm" || model.getValue("/root/init/cond") == "mdlnm" || model.getValue("/root/init/cond") == "smlnm" ) {
  292. // 2008.07.30 [YYJ] 대 / 중 / 소분류 명칭을 쿼리에서 "코드" + " : " + "명칭" 조합으로 뿌려줌에 따라
  293. // 변경처리함.. trim() 함수 상위 구현
  294. // 대/중/소 분류 구하는 스크립트를 수정처리 하였으나... 혹시 의도하지 않게 사용 할 수 있어
  295. // if / else로 처리 구문이 존재하여 유지함
  296. var lrgLabel = cmb_lrgcd.label.split(" : ");
  297. var mdlLabel = cmb_mdlcd.label.split(" : ");
  298. var smlLabel = cmb_smlcd.label.split(" : ");
  299. if ( lrgLabel.length > 1 )
  300. opener.model.setValue(path,cmb_lrgcd.value + "," + lrgLabel[1].trim() + "," + cmb_mdlcd.value + "," + mdlLabel[1].trim() + "," + cmb_smlcd.value + "," + smlLabel[1].trim() );
  301. else
  302. opener.model.setValue(path,cmb_lrgcd.value + "," + lrgLabel + "," + cmb_mdlcd.value + "," + mdlLabel + "," + cmb_smlcd.value + "," + smlLabel );
  303. }
  304. else opener.model.setValue(path,ipt_input.value);
  305. window.close();
  306. }
  307. else messageBox("상위 화면이 변경되어 데이터를 전달", "E001");
  308. ]]>
  309. </script>
  310. </button>
  311. <button id="btn_cancel2" class="btn4_letter2" style="left:242px; top:2px; width:56px; height:22px; ">
  312. <caption>취소</caption>
  313. <script type="javascript" ev:event="DOMActivate">
  314. <![CDATA[
  315. var path = model.getValue(PURTARGET_NODE + "/returnnode");
  316. if(path.length == 0)path = "/root/init/popinputcd";
  317. if (checkOpener())opener.model.setValue(path,"");
  318. window.close();
  319. ]]>
  320. </script>
  321. </button>
  322. <line id="line3" class="line_6" style="x1:0px; y1:0px; x2:299px; y2:0px; "/>
  323. <caption id="caption1" class="search_name" style="left:2px; top:5px; width:80px; height:19px; ">물품구분</caption>
  324. <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; ">
  325. <choices>
  326. <itemset nodeset="/root/init/cmb_goodflag">
  327. <label ref="cdnm"/>
  328. <value ref="cdid"/>
  329. </itemset>
  330. </choices>
  331. <script type="javascript" ev:event="xforms-value-changed">
  332. <![CDATA[
  333. rszfLMSComboList(model.getValue("/root/init/goodflag"), cmb_lrgcd.value, "", "cmb_mdlcd", "", "M");
  334. if (cmb_mdlcd.length > 0 && cmb_mdlcd.value != "" && cmb_mdlcd.value !=null )
  335. {
  336. cmb_mdlcd.dispatch("xforms-value-changed");
  337. }
  338. model.refresh();
  339. ]]>
  340. </script>
  341. </select1>
  342. </group>
  343. </case>
  344. </switch>
  345. </xhtml:body>
  346. </xhtml:html>