SMRSO23400_부서별특별관리품목지정.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet ype="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>부서별특별관리품목</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <specialgoodcdmngt>
  11. <specialgoodcdmngtlist/>
  12. </specialgoodcdmngt>
  13. <good>
  14. <gooddetail/>
  15. </good>
  16. <dupcheck>
  17. <dupyn/>
  18. </dupcheck>
  19. </main>
  20. <send>
  21. <search>
  22. <instcd/>
  23. <deptcd/>
  24. <deptnm/>
  25. <dd/>
  26. </search>
  27. <save>
  28. <specialgoodcdmngtlist/>
  29. </save>
  30. </send>
  31. <init>
  32. </init>
  33. <hidden/>
  34. <temp>
  35. </temp>
  36. <jaego>
  37. <search>
  38. <instcd/>
  39. <goodcd/>
  40. <ymd/>
  41. <fromdeptcd/>
  42. </search>
  43. <value/>
  44. </jaego>
  45. <popgood>
  46. <instcd/>
  47. <wareflag/>
  48. <delivedd/>
  49. <basedd/>
  50. <selectyn/>
  51. <goodcd/>
  52. <goodlist>
  53. <goodcd/>
  54. </goodlist>
  55. </popgood>
  56. <popdelive>
  57. <instcd/>
  58. <delivedd/>
  59. <delivedeptcd/>
  60. <delivedeptnm/>
  61. <opener/>
  62. </popdelive>
  63. <popreq>
  64. <count/>
  65. </popreq>
  66. <popsubdata/>
  67. </root>
  68. </instance>
  69. <script type="javascript" ev:event="xforms-ready">
  70. <![CDATA[
  71. //화면 Control을 초기화한다
  72. misfGridInit(grd_specialgoodcdmngtlist);
  73. misfComboInstCdListMulti("cmb_instcd",getCurrentDate(),"","N");
  74. model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd"));
  75. model.setValue("/root/send/search/dd" , getCurrentDate());
  76. model.setValue("/root/send/search/deptcd",getUserInfo("dutunitcd"));
  77. model.setValue("/root/send/search/deptnm",getUserInfo("dutunitnm"));
  78. model.refresh();
  79. ]]>
  80. </script>
  81. <submission id="TRRSO22802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/jaego/search" resultref="/root/jaego/value"/>
  82. <submission id="TRRSO20104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/popgood" resultref="/root/main/good"/>
  83. <submission id="TRRSO23401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/specialgoodcdmngt"/>
  84. <submission id="TXRSO23401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  85. </model>
  86. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  88. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  90. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  91. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  92. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  93. <script type="javascript">
  94. <![CDATA[
  95. function fGetGoodDetail() {
  96. for(var k = 1; k <= instance1.selectNodes("/root/popgood/goodlist").length; k++) {
  97. var bDup = false; //물품코드가 중복되었는지를 확인하기 위한 변수
  98. //popup에서 선택한 물품코드가 이미 grid에 존재하고 있는지를 check하여 이미 존재하면 message를 보여주고 return한다.
  99. for(var i = 1; i < grd_specialgoodcdmngtlist.rows; i++) {
  100. if( grd_specialgoodcdmngtlist.valueMatrix(i, grd_specialgoodcdmngtlist.colRef("goodcd")) == model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") ) {
  101. messageBox("물품코드가 중복되었습니다. [" + grd_specialgoodcdmngtlist.valueMatrix(i, grd_specialgoodcdmngtlist.colRef("goodcd")) + "] ", "E999", ""); //E: 경고
  102. bDup = true;
  103. continue;
  104. }
  105. }
  106. if( bDup == false ) {
  107. // node 삭제
  108. //model.removenode("/root/main/gooddetail");
  109. //TRRSO20104를 위해 물품코드를 goodcd에 넣는다.
  110. model.setValue( "/root/popgood/goodcd", model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") );
  111. if( submit("TRRSO20104") ) {
  112. //마직막 행에 물품코드가 등록되어 있으면 그 행에 바로 적용하고, 물품코드가 없으면 한 행을 추가한 뒤 적용한다.
  113. if( grd_specialgoodcdmngtlist.valueMatrix(grd_specialgoodcdmngtlist.rows-1, grd_specialgoodcdmngtlist.colRef("goodcd")) != "" ) {
  114. btn_add.dispatch("DOMActivate");
  115. }
  116. model.setValue(grd_specialgoodcdmngtlist.nodeset + "[" + (grd_specialgoodcdmngtlist.rows-1) + "]/goodcd", model.getValue("/root/main/good/gooddetail/goodcd"));
  117. model.setValue(grd_specialgoodcdmngtlist.nodeset + "[" + (grd_specialgoodcdmngtlist.rows-1) + "]/goodhngnm", model.getValue("/root/main/good/gooddetail/goodnm"));
  118. }
  119. } // if( bDup ...) end
  120. } // for(var k ...) end
  121. grd_specialgoodcdmngtlist.refresh();
  122. }
  123. ]]>
  124. </script>
  125. </xhtml:head>
  126. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  127. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  128. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:15px; ">부서별특별관리품목</caption>
  129. </group>
  130. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  131. <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1195px; y2:25px; "/>
  132. <button id="btn_save" class="btn4_letter2" navindex="12" style="left:1138px; top:3px; width:56px; height:22px; ">
  133. <caption>저장</caption>
  134. <script type="javascript" ev:event="DOMActivate">
  135. <![CDATA[
  136. for(var i = 1 ; i < grd_specialgoodcdmngtlist.rows ; i++){
  137. var deptnm = grd_specialgoodcdmngtlist.valueMatrix(i, grd_specialgoodcdmngtlist.colRef("deptnm"));
  138. if(deptnm == ""){
  139. messageBox(i+"번째줄에 선택된 부서가 없습니다. 확인해주십시오.", "E999", "");
  140. return;
  141. }
  142. var goodcd = grd_specialgoodcdmngtlist.valueMatrix(i, grd_specialgoodcdmngtlist.colRef("goodcd"));
  143. if(goodcd == ""){
  144. messageBox(i+"번째줄에 선택된 물품이 없습니다. 확인해주십시오.", "E999", "");
  145. return;
  146. }
  147. }
  148. model.setValue("/root/send/save/specialgoodcdmngtlist",grd_specialgoodcdmngtlist.getUpdateData());
  149. if(submit("TXRSO23401")){
  150. btn_search.dispatch("DOMActivate");
  151. }
  152. ]]>
  153. </script>
  154. </button>
  155. </group>
  156. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  157. <group id="grp_search" style="left:0px; top:0px; width:1195px; height:36px; vertical-align:top; ">
  158. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  159. <button id="btn_search" class="btn1_letter2" navindex="8" style="left:1128px; top:6px; width:56px; height:22px; ">
  160. <caption>조회</caption>
  161. <script type="javascript" ev:event="DOMActivate">
  162. <![CDATA[
  163. misfGridInit(grd_specialgoodcdmngtlist);
  164. if(submit("TRRSO23401")){
  165. }
  166. ]]>
  167. </script>
  168. </button>
  169. <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_default" disabled="true" navindex="1" appearance="minimal" style="left:67px; top:8px; width:136px; height:19px; text-align:center; ">
  170. <choices>
  171. <itemset nodeset="/root/main/init">
  172. <label ref="cnstnm"/>
  173. <value ref="cnstcd"/>
  174. </itemset>
  175. </choices>
  176. </select1>
  177. <caption id="cap_instcd" class="search_name" style="left:13px; top:9px; width:86px; height:17px; ">기관:</caption>
  178. <caption id="caption20" class="search_name" style="left:235px; top:9px; width:81px; height:17px; vertical-align:middle; ">부서:</caption>
  179. <line id="line30" class="line_4" style="x1:1115px; y1:5px; x2:1115px; y2:30px; "/>
  180. <button id="btn_deptcd" class="icon_search" navindex="5" style="left:397px; top:8px; width:16px; height:16px; ">
  181. <caption/>
  182. <script type="javascript" ev:event="DOMActivate">
  183. <![CDATA[
  184. misfOpenPopUpList("02", ipt_deptcd,"", "deptcd,deptnm");
  185. ipt_deptcd.refresh();
  186. opt_deptcd.refresh();
  187. ]]>
  188. </script>
  189. </button>
  190. <input id="ipt_deptcd" ref="/root/send/search/deptcd" class="input_default" navindex="4" style="left:290px; top:8px; width:105px; height:19px; ">
  191. <script type="javascript" ev:event="xforms-value-changed">
  192. <![CDATA[
  193. misfValidationCheck("02", "", "deptcd,deptnm" );
  194. ipt_deptcd.refresh();
  195. opt_deptcd.refresh();
  196. ]]>
  197. </script>
  198. <script type="javascript" ev:event="onkeypress">
  199. <![CDATA[
  200. //2012.04.05 박준범 추가
  201. inputEnterKey("ipt_deptcd", "xforms-value-changed");
  202. ]]>
  203. </script>
  204. </input>
  205. <output id="opt_deptcd" ref="/root/send/search/deptnm" class="output_fix" appearance="output" style="left:415px; top:8px; width:156px; height:19px; "/>
  206. <input id="ipt_dd" ref="/root/send/search/dd" visibility="hidden" format="yyyy-mm-dd" style="left:660px; top:8px; width:100px; height:19px; "/>
  207. </group>
  208. <button id="btn_del" class="btn2_letter3" navindex="11" style="left:1137px; top:39px; width:53px; height:19px; ">
  209. <caption>행삭제</caption>
  210. <script type="javascript" ev:event="DOMActivate">
  211. <![CDATA[
  212. misfGridIUD(grd_specialgoodcdmngtlist, "D");
  213. ]]>
  214. </script>
  215. </button>
  216. <caption id="caption4" class="tit_2" style="left:0px; top:45px; width:215px; height:15px; ">특별관리품목 리스트</caption>
  217. <button id="btn_add" class="btn2_letter3" navindex="10" style="left:1083px; top:39px; width:53px; height:19px; ">
  218. <caption>행추가</caption>
  219. <script type="javascript" ev:event="DOMActivate">
  220. <![CDATA[
  221. misfGridIUD(grd_specialgoodcdmngtlist, "A");
  222. grd_specialgoodcdmngtlist.valueMatrix(grd_specialgoodcdmngtlist.row, grd_specialgoodcdmngtlist.colRef("instcd")) = cmb_instcd.value;
  223. grd_specialgoodcdmngtlist.valueMatrix(grd_specialgoodcdmngtlist.row, grd_specialgoodcdmngtlist.colRef("deptcd")) = ipt_deptcd.value;
  224. grd_specialgoodcdmngtlist.valueMatrix(grd_specialgoodcdmngtlist.row, grd_specialgoodcdmngtlist.colRef("deptnm")) = opt_deptcd.value;
  225. ]]>
  226. </script>
  227. </button>
  228. <line id="line3" class="line_1" style="x1:0px; y1:60px; x2:1195px; y2:60px; "/>
  229. <datagrid id="grd_specialgoodcdmngtlist" nodeset="/root/main/specialgoodcdmngt/specialgoodcdmngtlist" class="datagrid2" caption="부서코드^부서명^물품코드^물품명^시작일자^종료일자" colsep="^" colwidth="130, 200, 130, 200, 100, 100, 38" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" navindex="9" style="left:0px; top:65px; width:1195px; height:650px; ">
  230. <col disabled="true" ref="deptcd" type="inputbutton"/>
  231. <col ref="deptnm"/>
  232. <col disabled="true" ref="goodcd" type="inputbutton"/>
  233. <col ref="goodhngnm"/>
  234. <col ref="fromdd" type="inputdate" format="yyyy-mm-dd"/>
  235. <col ref="todd" type="inputdate" format="yyyy-mm-dd"/>
  236. <col ref="instcd" visibility="hidden"/>
  237. <script type="javascript" ev:event="onbuttonclick">
  238. <![CDATA[
  239. if(grd_specialgoodcdmngtlist.colAttribute(grd_specialgoodcdmngtlist.col,"ref") == "goodcd"){
  240. //popup 에 전달할 parameter를 setting한다.
  241. model.setValue("/root/popgood/instcd", cmb_instcd.value);
  242. model.setValue("/root/popgood/delivedd", ipt_dd.value ); //향후 시점재고 조회를 위해 출고일자를 set
  243. //2012.09.17 박준범 - SPRSO20700.xrw 에서 사용하기 위해 basedd를 추가 함
  244. model.setValue("/root/popgood/basedd", ipt_dd.value ); //물품코드 popup 에서 출고일자 기준으로 물품 Master 조회하기 위해서
  245. //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
  246. model.setValue("/root/popgood/selectyn", "");
  247. //popup 프로그램 호출
  248. //window.load("SPRSO20300.xrw", "modal","", "", "/root/popgood","/root/popdata"); //단일선택창
  249. window.load("SPRSO20700.xrw", "modal","", "", "/root/popgood","/root/popdata"); //다중선택창
  250. //popup에서 특정 물품코드를 선택한 경우, 해당 물품코드에 대한 상세 사항을 조회해서 그리드에 보여준다.
  251. if(model.getValue("/root/popgood/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
  252. fGetGoodDetail(); //물품코드의 상세내역과 현재고를 조회하여 Grid에 보여줌
  253. }
  254. }else if(grd_specialgoodcdmngtlist.colAttribute(grd_specialgoodcdmngtlist.col,"ref") == "deptcd"){
  255. misfOpenPopUpList("02", grd_specialgoodcdmngtlist,"", "deptcd,deptnm") ;
  256. }
  257. ]]>
  258. </script>
  259. </datagrid>
  260. <button id="btn_jaego" class="btn2_letter4" navindex="10" visibility="visible" style="left:1018px; top:39px; width:64px; height:19px; ">
  261. <caption>부서재고</caption>
  262. <script type="javascript" ev:event="DOMActivate">
  263. <![CDATA[
  264. if(ipt_deptcd.value == "") {
  265. messageBox("부서가 선택되지 않았습니다. \n\n먼저 부서를 선택하십시요.", "E999", "");
  266. model.setFocus("ipt_deptcd");
  267. return;
  268. };
  269. //popup 에 전달할 parameter를 setting한다.
  270. model.setValue("/root/popdelive/instcd", cmb_instcd.value);
  271. model.setValue("/root/popdelive/delivedd", ipt_dd.value);
  272. model.setValue("/root/popdelive/delivedeptcd", ipt_deptcd.value);
  273. model.setValue("/root/popdelive/delivedeptnm", opt_deptcd.value);
  274. model.setValue("/root/popdelive/opener", "jaego");
  275. //갯수초기화
  276. model.setValue("/root/popreq/count", 0);
  277. //popup 프로그램 호출
  278. window.load("SMRSO21450.xrw", "modal","", "", "/root/popdelive","/root/popdata");
  279. var cnt = model.getValue("/root/popreq/count");
  280. var mrows = grd_specialgoodcdmngtlist.rows;
  281. var mcnt = parseInt(mrows)+parseInt(cnt);
  282. var j = 1;
  283. for(i = mrows ; i <= mcnt-1 ; i++){
  284. misfGridIUD(grd_specialgoodcdmngtlist, "A");
  285. model.setValue("/root/main/specialgoodcdmngt/specialgoodcdmngtlist["+i+"]/instcd", cmb_instcd.value); //기관코드
  286. model.setValue("/root/main/specialgoodcdmngt/specialgoodcdmngtlist["+i+"]/deptcd", ipt_deptcd.value); //부서코드
  287. model.setValue("/root/main/specialgoodcdmngt/specialgoodcdmngtlist["+i+"]/deptnm", opt_deptcd.value); //부서명
  288. model.setValue("/root/main/specialgoodcdmngt/specialgoodcdmngtlist["+i+"]/goodcd", model.getValue("/root/popsubdata/stocklist["+j+"]/goodcd")); //물품코드
  289. model.setValue("/root/main/specialgoodcdmngt/specialgoodcdmngtlist["+i+"]/goodhngnm", model.getValue("/root/popsubdata/stocklist["+j+"]/goodnm")); //물품명
  290. j++;
  291. }
  292. grd_specialgoodcdmngtlist.refresh();
  293. ]]>
  294. </script>
  295. </button>
  296. </group>
  297. </xhtml:body>
  298. </xhtml:html>