SMRSO23200_부서창고반납.xrw 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  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:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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. <deptreturn>
  11. <deptreturnlist/>
  12. </deptreturn>
  13. <good>
  14. <gooddetail/>
  15. </good>
  16. <dupcheck>
  17. <dupyn/>
  18. </dupcheck>
  19. </main>
  20. <send>
  21. <search>
  22. <instcd/>
  23. <fromdeptcd/>
  24. <fromdeptnm/>
  25. <fromdd/>
  26. <todd/>
  27. <goodcd/>
  28. <goodnm/>
  29. </search>
  30. <save>
  31. <deptreturnlist/>
  32. </save>
  33. </send>
  34. <init>
  35. </init>
  36. <hidden/>
  37. <temp>
  38. </temp>
  39. <jaego>
  40. <search>
  41. <instcd/>
  42. <goodcd/>
  43. <ymd/>
  44. <fromdeptcd/>
  45. </search>
  46. <value/>
  47. </jaego>
  48. <popgood>
  49. <instcd/>
  50. <wareflag/>
  51. <delivedd/>
  52. <basedd/>
  53. <selectyn/>
  54. <goodcd/>
  55. <goodlist>
  56. <goodcd/>
  57. </goodlist>
  58. </popgood>
  59. <popdelive>
  60. <instcd/>
  61. <delivedd/>
  62. <delivedeptcd/>
  63. <delivedeptnm/>
  64. <opener/>
  65. </popdelive>
  66. <popreq>
  67. <count/>
  68. </popreq>
  69. <popsubdata/>
  70. </root>
  71. </instance>
  72. <script type="javascript" ev:event="xforms-ready">
  73. <![CDATA[
  74. //화면 Control을 초기화한다
  75. misfGridInit(grd_deptreturnlist);
  76. misfComboInstCdListMulti("cmb_instcd",getCurrentDate(),"","N");
  77. model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd"));
  78. model.setValue("/root/send/search/fromdd" , getCurrentDate());
  79. model.setValue("/root/send/search/todd" , getCurrentDate());
  80. model.setValue("/root/send/search/fromdeptcd",getUserInfo("dutunitcd"));
  81. model.setValue("/root/send/search/fromdeptnm",getUserInfo("dutunitnm"));
  82. if(getUserInfo("dutunitcd") == "4020334000" || getUserInfo("userid") == "MIS"){ //물류파트일경우
  83. granton = "Y";
  84. }
  85. model.refresh();
  86. ]]>
  87. </script>
  88. <submission id="TRRSO23201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/deptreturn"/>
  89. <submission id="TXRSO23201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
  90. <submission id="TRRSO20104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/popgood" resultref="/root/main/good"/>
  91. <submission id="TRRSO22802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/jaego/search" resultref="/root/jaego/value"/>
  92. </model>
  93. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  94. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  95. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  96. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  97. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  98. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  99. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  100. <script type="javascript">
  101. <![CDATA[
  102. var granton = "N";
  103. function fGetGoodDetail() {
  104. for(var k = 1; k <= instance1.selectNodes("/root/popgood/goodlist").length; k++) {
  105. var bDup = false; //물품코드가 중복되었는지를 확인하기 위한 변수
  106. //popup에서 선택한 물품코드가 이미 grid에 존재하고 있는지를 check하여 이미 존재하면 message를 보여주고 return한다.
  107. for(var i = 1; i < grd_deptreturnlist.rows; i++) {
  108. if( grd_deptreturnlist.valueMatrix(i, grd_deptreturnlist.colRef("goodcd")) == model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") ) {
  109. messageBox("물품코드가 중복되었습니다. [" + grd_deptreturnlist.valueMatrix(i, grd_deptreturnlist.colRef("goodcd")) + "] ", "E999", ""); //E: 경고
  110. bDup = true;
  111. continue;
  112. }
  113. }
  114. if( bDup == false ) {
  115. // node 삭제
  116. //model.removenode("/root/main/gooddetail");
  117. //TRRSO20104를 위해 물품코드를 goodcd에 넣는다.
  118. model.setValue( "/root/popgood/goodcd", model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") );
  119. if( submit("TRRSO20104") ) {
  120. /* model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/instcd", model.getValue("/root/send/search/instcd"));
  121. model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/delivedd", model.getValue("/root/send/search/delivedd"));
  122. //model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/deliveno", model.getValue("/root/send/search/deliveno"));
  123. //model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/deliveseq", model.getValue("/root/send/search/deliveseq"));
  124. model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/wareflag", model.getValue("/root/send/search/wareflag"));
  125. model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/delivedeptcd", model.getValue("/root/send/search/delivedeptcd"));
  126. */
  127. //마직막 행에 물품코드가 등록되어 있으면 그 행에 바로 적용하고, 물품코드가 없으면 한 행을 추가한 뒤 적용한다.
  128. if( grd_deptreturnlist.valueMatrix(grd_deptreturnlist.rows-1, grd_deptreturnlist.colRef("goodcd")) != "" ) {
  129. btn_add.dispatch("DOMActivate");
  130. }
  131. model.setValue(grd_deptreturnlist.nodeset + "[" + (grd_deptreturnlist.rows-1) + "]/goodcd", model.getValue("/root/main/good/gooddetail/goodcd"));
  132. model.setValue(grd_deptreturnlist.nodeset + "[" + (grd_deptreturnlist.rows-1) + "]/goodhngnm", model.getValue("/root/main/good/gooddetail/goodnm"));
  133. model.setValue(grd_deptreturnlist.nodeset + "[" + (grd_deptreturnlist.rows-1) + "]/goodspec", model.getValue("/root/main/good/gooddetail/goodspec"));
  134. model.setValue(grd_deptreturnlist.nodeset + "[" + (grd_deptreturnlist.rows-1) + "]/returnqty", "0");
  135. // if(grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("goodhngnm")) != ""){
  136. // model.setValue("/root/jaego/search/goodcd", grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("goodcd")));
  137. // model.setValue("/root/jaego/search/ymd", grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("returndd")));
  138. // model.setValue("/root/jaego/search/instcd", grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("instcd")));
  139. // model.setValue("/root/jaego/search/fromdeptcd", grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("fromdeptcd")));
  140. // submit("TRRSO22802");
  141. //
  142. // var jaego = model.getValue("/root/jaego/value/value/jaegoqty");
  143. // grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("jaegoqty")) = jaego;
  144. // }
  145. }
  146. } // if( bDup ...) end
  147. } // for(var k ...) end
  148. grd_deptreturnlist.refresh();
  149. }
  150. ]]>
  151. </script>
  152. </xhtml:head>
  153. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  154. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  155. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:15px; ">부서창고반납</caption>
  156. </group>
  157. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  158. <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1195px; y2:25px; "/>
  159. <button id="btn_save" class="btn4_letter2" navindex="12" style="left:1138px; top:3px; width:56px; height:22px; ">
  160. <caption>저장</caption>
  161. <script type="javascript" ev:event="DOMActivate">
  162. <![CDATA[
  163. for(var i = 1 ; i < grd_deptreturnlist.rows ; i++){
  164. var todeptnm = grd_deptreturnlist.valueMatrix(i, grd_deptreturnlist.colRef("todeptnm"));
  165. if(todeptnm == ""){
  166. messageBox(i+"번째줄 물품받는부서가 없습니다. 확인해주십시오.", "E999", "");
  167. return;
  168. }
  169. }
  170. model.setValue("/root/send/save/deptreturnlist",grd_deptreturnlist.getUpdateData());
  171. if(submit("TXRSO23201")){
  172. btn_search.dispatch("DOMActivate");
  173. }
  174. ]]>
  175. </script>
  176. </button>
  177. </group>
  178. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  179. <group id="grp_search" style="left:0px; top:0px; width:1195px; height:60px; vertical-align:top; ">
  180. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
  181. <button id="btn_search" class="btn1_letter2" navindex="8" style="left:1128px; top:20px; width:56px; height:22px; ">
  182. <caption>조회</caption>
  183. <script type="javascript" ev:event="DOMActivate">
  184. <![CDATA[
  185. // if(opt_fromdeptcd.value == "") {
  186. // messageBox("부서가 선택되지 않았습니다. \n\n먼저 부서를 선택하십시요.", "E999", "");
  187. // model.setFocus("ipt_fromdeptcd");
  188. // return;
  189. // };
  190. if(ipt_fromdd.value.length < 8) {
  191. messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
  192. model.setFocus("ipt_movefromdd");
  193. return;
  194. };
  195. if(ipt_todd.value.length < 8) {
  196. messageBox("이동일자가 선택되지 않았거나 잘못되었습니다. \n\n먼저 이동일자를 선택하십시요.", "E999", "");
  197. model.setFocus("ipt_movetodd");
  198. return;
  199. };
  200. misfGridInit(grd_deptreturnlist);
  201. if(submit("TRRSO23201")){
  202. if(granton == "N"){
  203. for( var i = 1 ; i < grd_deptreturnlist.rows ; i++ ){
  204. var returngubun = grd_deptreturnlist.valueMatrix(i, grd_deptreturnlist.colRef("returngubun"));
  205. if(returngubun == "3"){
  206. grd_deptreturnlist.cellAttribute("disabled", i, 1, i, grd_deptreturnlist.colRef("returngubun")) = "true";
  207. }
  208. }
  209. }
  210. }
  211. ]]>
  212. </script>
  213. </button>
  214. <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_default" disabled="true" navindex="1" appearance="minimal" style="left:135px; top:8px; width:225px; height:19px; text-align:center; ">
  215. <choices>
  216. <itemset nodeset="/root/main/init">
  217. <label ref="cnstnm"/>
  218. <value ref="cnstcd"/>
  219. </itemset>
  220. </choices>
  221. </select1>
  222. <caption id="cap_instcd" class="search_name" style="left:13px; top:9px; width:132px; height:17px; ">기관:</caption>
  223. <input id="ipt_fromdd" ref="/root/send/search/fromdd" navindex="2" inputtype="date" format="yyyy-mm-dd" style="left:467px; top:8px; width:85px; height:19px; text-align:center; ">
  224. <script type="javascript" ev:event="xforms-value-changed">
  225. <![CDATA[
  226. ]]>
  227. </script>
  228. </input>
  229. <caption id="caption20" class="search_name" style="left:13px; top:33px; width:118px; height:17px; vertical-align:middle; ">물품보내는부서:</caption>
  230. <line id="line30" class="line_4" style="x1:1115px; y1:5px; x2:1115px; y2:55px; "/>
  231. <button id="btn_delivedeptcd" class="icon_search" navindex="5" style="left:217px; top:35px; width:16px; height:16px; ">
  232. <caption/>
  233. <script type="javascript" ev:event="DOMActivate">
  234. <![CDATA[
  235. misfOpenPopUpList("02", ipt_fromdeptcd,"", "fromdeptcd,fromdeptnm");
  236. ipt_fromdeptcd.refresh();
  237. opt_fromdeptcd.refresh();
  238. ]]>
  239. </script>
  240. </button>
  241. <input id="ipt_fromdeptcd" ref="/root/send/search/fromdeptcd" class="input_default" navindex="4" style="left:135px; top:33px; width:80px; height:19px; ">
  242. <script type="javascript" ev:event="xforms-value-changed">
  243. <![CDATA[
  244. misfValidationCheck("02", "", "fromdeptcd,fromdeptnm" );
  245. ipt_fromdeptcd.refresh();
  246. opt_fromdeptcd.refresh();
  247. ]]>
  248. </script>
  249. <script type="javascript" ev:event="onkeypress">
  250. <![CDATA[
  251. //2012.04.05 박준범 추가
  252. inputEnterKey("ipt_fromdeptcd", "xforms-value-changed");
  253. ]]>
  254. </script>
  255. </input>
  256. <output id="opt_fromdeptcd" ref="/root/send/search/fromdeptnm" class="output_fix" appearance="output" style="left:235px; top:33px; width:125px; height:19px; "/>
  257. <caption id="caption9" class="search_name" style="left:386px; top:9px; width:86px; height:17px; ">반납일자:</caption>
  258. <input id="ipt_goodnm" ref="/root/send/search/goodnm" style="left:880px; top:8px; width:132px; height:19px; ">
  259. <script type="javascript" ev:event="xforms-value-changed">
  260. <![CDATA[
  261. if(ipt_goodnm.value.length == 0)
  262. ipt_goodcd.value = "";
  263. else
  264. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodnm",
  265. "goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," + model.getValue(ipt_goodnm.attribute("ref")) ,"","goodcd,goodnm",
  266. ipt_goodnm,"SPRSD00210","instcd","cmb_instcd");
  267. ipt_goodcd.refresh();
  268. ipt_goodnm.refresh();
  269. ]]>
  270. </script>
  271. </input>
  272. <caption id="caption5" class="search_name" style="left:695px; top:8px; width:90px; height:17px; ">물품코드 :</caption>
  273. <input id="ipt_goodcd" ref="/root/send/search/goodcd" style="left:780px; top:8px; width:80px; height:19px; ">
  274. <script type="javascript" ev:event="xforms-value-changed">
  275. <![CDATA[
  276. if(ipt_goodcd.value.length == 0)
  277. ipt_goodnm.value = "";
  278. else
  279. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodcd",
  280. "goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," + model.getValue(ipt_goodcd.attribute("ref")) ,"","goodcd,goodnm",
  281. ipt_goodcd,"SPRSD00210","instcd","cmb_instcd");
  282. ipt_goodcd.refresh();
  283. ipt_goodnm.refresh();
  284. ]]>
  285. </script>
  286. </input>
  287. <button id="btn_goodcd" class="icon_search" style="left:862px; top:8px; width:16px; height:16px; ">
  288. <caption/>
  289. <script type="javascript" ev:event="DOMActivate">
  290. <![CDATA[
  291. rszfOpenPopUpListByWndName(ipt_goodcd,"","goodcd,allsizespecid,goodnm","SPRSD00210","instcd","cmb_instcd,");
  292. ipt_goodcd.refresh();
  293. ipt_goodnm.refresh();
  294. ]]>
  295. </script>
  296. </button>
  297. <input id="ipt_todd" ref="/root/send/search/todd" navindex="2" inputtype="date" format="yyyy-mm-dd" style="left:570px; top:8px; width:85px; height:19px; text-align:center; ">
  298. <script type="javascript" ev:event="xforms-value-changed">
  299. <![CDATA[
  300. ]]>
  301. </script>
  302. </input>
  303. <caption id="caption1" style="left:555px; top:9px; width:15px; height:20px; ">~</caption>
  304. </group>
  305. <button id="btn_del" class="btn2_letter3" navindex="11" style="left:1137px; top:64px; width:53px; height:19px; ">
  306. <caption>행삭제</caption>
  307. <script type="javascript" ev:event="DOMActivate">
  308. <![CDATA[
  309. if(granton == "N"){
  310. var returngubun = grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("returngubun"));
  311. if(returngubun == "3"){
  312. messageBox("승인된 자료는 삭제 할 수 없습니다.", "E999", "");
  313. return;
  314. }
  315. }
  316. misfGridIUD(grd_deptreturnlist, "D");
  317. ]]>
  318. </script>
  319. </button>
  320. <caption id="caption4" class="tit_2" style="left:0px; top:70px; width:215px; height:13px; ">반납내역</caption>
  321. <button id="btn_add" class="btn2_letter3" navindex="10" style="left:1083px; top:64px; width:53px; height:19px; ">
  322. <caption>행추가</caption>
  323. <script type="javascript" ev:event="DOMActivate">
  324. <![CDATA[
  325. misfGridIUD(grd_deptreturnlist, "A");
  326. grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("instcd")) = cmb_instcd.value;
  327. grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("returndd")) = ipt_fromdd.value;
  328. grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("fromdeptcd")) = ipt_fromdeptcd.value;
  329. grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("fromdeptnm")) = opt_fromdeptcd.value;
  330. grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("returngubun")) = "1";
  331. grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("todeptcd")) = "4020334000";
  332. grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("todeptnm")) = "물류파트";
  333. ]]>
  334. </script>
  335. </button>
  336. <line id="line3" class="line_1" style="x1:0px; y1:85px; x2:1195px; y2:85px; "/>
  337. <datagrid id="grd_deptreturnlist" nodeset="/root/main/deptreturn/deptreturnlist" visibility="visible" caption="반납일자^물품코드^물품명^규격^반납수량^반납사유^물품보내는부서^물품받는부서^이동요청^물보부^물받부^부서반납NO^창고구분^기관^삭제키(선납)^삭제키(창고)^단가" colsep="^" colwidth="80, 125, 181, 188, 60, 199, 130, 130, 60, 27, 27, 27, 27, 27, 29, 23, 25" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" navindex="9" style="left:0px; top:90px; width:1195px; height:650px; ">
  338. <col disabled="true" ref="returndd" type="output" format="yyyy-mm-dd" style="text-align:center; "/>
  339. <col disabled="true" ref="goodcd" type="inputbutton"/>
  340. <col ref="goodhngnm"/>
  341. <col ref="goodspec"/>
  342. <col ref="returnqty" type="input" style="text-align:center; "/>
  343. <col ref="cmt" type="input"/>
  344. <col disabled="true" ref="fromdeptnm" type="inputbutton"/>
  345. <col disabled="true" ref="todeptnm" type="inputbutton"/>
  346. <col ref="returngubun" type="combo" style="text-align:center; ">
  347. <choices>
  348. <item>
  349. <label>신규</label>
  350. <value>1</value>
  351. </item>
  352. <item>
  353. <label>요청</label>
  354. <value>2</value>
  355. </item>
  356. <item>
  357. <label>승인</label>
  358. <value>3</value>
  359. </item>
  360. </choices>
  361. </col>
  362. <col ref="fromdeptcd" visibility="hidden"/>
  363. <col ref="todeptcd" visibility="hidden"/>
  364. <col ref="returnno" visibility="hidden"/>
  365. <col ref="wareflag" visibility="hidden"/>
  366. <col ref="instcd" visibility="hidden"/>
  367. <col ref="instid" visibility="hidden"/>
  368. <col ref="wareinstid" visibility="hidden"/>
  369. <col ref="goodunitcost" visibility="hidden"/>
  370. <script type="javascript" ev:event="onbuttonclick">
  371. <![CDATA[
  372. if(grd_deptreturnlist.colAttribute(grd_deptreturnlist.col,"ref") == "goodcd"){
  373. //popup 에 전달할 parameter를 setting한다.
  374. model.setValue("/root/popgood/instcd", cmb_instcd.value);
  375. model.setValue("/root/popgood/delivedd", ipt_fromdd.value ); //향후 시점재고 조회를 위해 출고일자를 set
  376. //2012.09.17 박준범 - SPRSO20700.xrw 에서 사용하기 위해 basedd를 추가 함
  377. model.setValue("/root/popgood/basedd", ipt_fromdd.value ); //물품코드 popup 에서 출고일자 기준으로 물품 Master 조회하기 위해서
  378. //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
  379. model.setValue("/root/popgood/selectyn", "");
  380. //popup 프로그램 호출
  381. //window.load("SPRSO20300.xrw", "modal","", "", "/root/popgood","/root/popdata"); //단일선택창
  382. window.load("SPRSO20700.xrw", "modal","", "", "/root/popgood","/root/popdata"); //다중선택창
  383. //popup에서 특정 물품코드를 선택한 경우, 해당 물품코드에 대한 상세 사항을 조회해서 그리드에 보여준다.
  384. if(model.getValue("/root/popgood/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
  385. fGetGoodDetail(); //물품코드의 상세내역과 현재고를 조회하여 Grid에 보여줌
  386. //출고량을 입력하도록 focus이동
  387. grd_deptreturnlist.col = grd_deptreturnlist.colRef("returnqty");
  388. }
  389. }else if(grd_deptreturnlist.colAttribute(grd_deptreturnlist.col,"ref") == "fromdeptnm"){
  390. misfOpenPopUpList("02", grd_deptreturnlist,"", "fromdeptcd,fromdeptnm") ;
  391. }else if(grd_deptreturnlist.colAttribute(grd_deptreturnlist.col,"ref") == "todeptnm"){
  392. misfOpenPopUpList("02", grd_deptreturnlist,"", "todeptcd,todeptnm") ;
  393. }
  394. ]]>
  395. </script>
  396. <script type="javascript" ev:event="xforms-value-changed">
  397. <![CDATA[
  398. if(granton == "N"){
  399. var returngubun = grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("returngubun"));
  400. if(returngubun == "3"){
  401. messageBox("승인 권한이 없습니다.", "I999", "");
  402. grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("returngubun")) = "2";
  403. }
  404. }
  405. // if(grd_deptreturnlist.colAttribute(grd_deptreturnlist.col,"ref") == "moveqty"){
  406. // var jaegoqty = grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("jaegoqty"));
  407. // var moveqty = grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("moveqty"));
  408. // if(jaegoqty < moveqty){
  409. // messageBox("이동수량이 현재고량보다 많을 수는 없습니다.", "I999", "");
  410. // grd_deptreturnlist.valueMatrix(grd_deptreturnlist.row, grd_deptreturnlist.colRef("moveqty")) = jaegoqty;
  411. // }
  412. // grd_deptreturnlist.refresh();
  413. // }
  414. ]]>
  415. </script>
  416. </datagrid>
  417. <button id="btn_jaego" class="btn2_letter4" navindex="10" visibility="visible" style="left:1018px; top:64px; width:64px; height:19px; ">
  418. <caption>부서재고</caption>
  419. <script type="javascript" ev:event="DOMActivate">
  420. <![CDATA[
  421. if(ipt_fromdeptcd.value == "") {
  422. messageBox("부서가 선택되지 않았습니다. \n\n먼저 부서를 선택하십시요.", "E999", "");
  423. model.setFocus("ipt_fromdeptcd");
  424. return;
  425. };
  426. //popup 에 전달할 parameter를 setting한다.
  427. model.setValue("/root/popdelive/instcd", cmb_instcd.value);
  428. model.setValue("/root/popdelive/delivedd", ipt_fromdd.value);
  429. model.setValue("/root/popdelive/delivedeptcd", ipt_fromdeptcd.value);
  430. model.setValue("/root/popdelive/delivedeptnm", opt_fromdeptcd.value);
  431. model.setValue("/root/popdelive/opener", "jaego");
  432. //갯수초기화
  433. model.setValue("/root/popreq/count", 0);
  434. //popup 프로그램 호출
  435. window.load("SMRSO21450.xrw", "modal","", "", "/root/popdelive","/root/popdata");
  436. var cnt = model.getValue("/root/popreq/count");
  437. var mrows = grd_deptreturnlist.rows;
  438. var mcnt = parseInt(mrows)+parseInt(cnt);
  439. var j = 1;
  440. for(i = mrows ; i <= mcnt-1 ; i++){
  441. misfGridIUD(grd_deptreturnlist, "A");
  442. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/goodcd", model.getValue("/root/popsubdata/stocklist["+j+"]/goodcd")); //물품코드
  443. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/goodhngnm", model.getValue("/root/popsubdata/stocklist["+j+"]/goodnm")); //물품명
  444. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/goodspec", model.getValue("/root/popsubdata/stocklist["+j+"]/goodspec")); //규격
  445. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/wareflag", model.getValue("/root/popsubdata/stocklist["+j+"]/wareflag")); //창고구분
  446. //model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/hun_jaego", model.getValue("/root/popsubdata/stocklist["+j+"]/hun_jaego")); //현재고수량
  447. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/instcd", cmb_instcd.value); //기관코드
  448. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/returndd", ipt_fromdd.value); //반납일자
  449. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/fromdeptcd", ipt_fromdeptcd.value); //물품보내는부서
  450. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/fromdeptnm", opt_fromdeptcd.value); //물품보내는부서
  451. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/returngubun", "1"); //이동요청
  452. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/todeptcd", "4020334000"); //물품받는부서
  453. model.setValue("/root/main/deptreturn/deptreturnlist["+i+"]/todeptnm", "물류파트"); //물품받는부서
  454. j++;
  455. }
  456. grd_deptreturnlist.refresh();
  457. ]]>
  458. </script>
  459. </button>
  460. </group>
  461. </xhtml:body>
  462. </xhtml:html>