SMRSO22800_물품이동내역.xrw 26 KB

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