SMRSO21000_입고등록(부서재고)(경북대).xrw 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890
  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. <cond>
  10. <instcd/>
  11. <windd/>
  12. <winkind/>
  13. <reqdeptcd/>
  14. <reqdeptnm/>
  15. <windeptcd/>
  16. <windeptnm/>
  17. </cond>
  18. <main>
  19. <list>
  20. <deptwininfo>
  21. <deptwinlist/>
  22. </deptwininfo>
  23. </list>
  24. <good>
  25. <gooddetail/>
  26. </good>
  27. <dupcheck>
  28. <dupyn/>
  29. </dupcheck>
  30. </main>
  31. <send>
  32. </send>
  33. <init>
  34. </init>
  35. <hidden/>
  36. <temp>
  37. </temp>
  38. <popdata>
  39. <srchdd/>
  40. </popdata>
  41. <popdelive>
  42. <instcd/>
  43. <delivedd/>
  44. <delivedeptcd/>
  45. <delivedeptnm/>
  46. <opener/>
  47. </popdelive>
  48. <popreq>
  49. <count/>
  50. </popreq>
  51. <popsubdata/>
  52. <popgood>
  53. <instcd/>
  54. <wareflag/>
  55. <delivedd/>
  56. <basedd/>
  57. <selectyn/>
  58. <goodcd/>
  59. <goodlist>
  60. <goodcd/>
  61. </goodlist>
  62. </popgood>
  63. <magam/>
  64. <magamsearch>
  65. <instcd/>
  66. <dd/>
  67. <deptcd/>
  68. </magamsearch>
  69. <distrimagam/>
  70. </root>
  71. </instance>
  72. <script type="javascript" ev:event="xforms-ready">
  73. <![CDATA[
  74. //화면 Control을 초기화한다
  75. misfGridInit(grd_deptwinlist);
  76. misfGetAndSetUserInfo(); //접속자기본정보
  77. //misfComboComCdList("Z0007",cmb_instcd);
  78. //misfComboComCdList("030R0019",cmb_winkind);
  79. misfComboComCdListMulti("Z0007,030R0019,030R0019","cmb_instcd,cmb_winkind,grd_deptwinlist.winkind");
  80. addComboItem( "cmb_winkind", "전체", "", "above");
  81. model.setValue(cmb_winkind.attribute("ref"), "");
  82. model.setValue("/root/cond/reqdeptcd", DUT_PLCEDEPT_CD);
  83. model.setValue("/root/cond/reqdeptnm", DUT_PLCEDEPT_NM);
  84. model.setValue("/root/cond/windeptcd", DUT_PLCEDEPT_CD);
  85. model.setValue("/root/cond/windeptnm", DUT_PLCEDEPT_NM);
  86. model.setValue("/root/cond/instcd", getUserInfo("dutplceinstcd")); //기관 설정
  87. model.setValue("/root/cond/windd" , getCurrentDate()); //출고일자 설정
  88. //model.setValue("/root/cond/winkind", "01"); //출고유형 설정 (03:구매청구)
  89. cap_magam.value = "";
  90. distriyn = "N";
  91. model.refresh();
  92. ]]>
  93. </script>
  94. <submission id="TRRSO21001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cond" resultref="/root/main/list"/>
  95. <submission id="TXRSO21001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  96. <submission id="TRRSO20104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/popgood" resultref="/root/main/good"/>
  97. <submission id="TRRSO21002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/magamsearch" resultref="/root/magam"/>
  98. <submission id="TRRSO21003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/magamsearch" resultref="/root/distrimagam"/>
  99. </model>
  100. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  101. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  102. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  103. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  104. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  105. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  106. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  107. <script type="javascript">
  108. <![CDATA[
  109. /**
  110. * @ver : 2011-10-10
  111. * @desc : Popup창에서 해당정보 받기
  112. * @param :
  113. * @return :
  114. * @---------------------------------------------------
  115. */
  116. function fGetGoodInfo(getRCVS){
  117. var params = getRCVS.split("▩");
  118. for(var i = 1; i <(params.length-1); i++){
  119. var sGoodcd = params[i].split("▦")[0]; //물품코드
  120. var sEdicd = params[i].split("▦")[1] ; //edicd
  121. var sGoodnm = params[i].split("▦")[2]; //물품명
  122. var sGoodspec = params[i].split("▦")[3]; //물품규격
  123. var sDeliveunit = params[i].split("▦")[4]; //슈불단위
  124. var sPurcunit = params[i].split("▦")[5]; //구매단위
  125. var sAcntcd = params[i].split("▦")[6]; //계정코드
  126. var sAcntnm = params[i].split("▦")[7]; //계정명
  127. var sWinunitcost = params[i].split("▦")[8]; //단가. 2012.04.05 박준범 추가
  128. var compGoodcd;
  129. var k;
  130. for( k =grd_deptwinlist.fixedRows;k <grd_deptwinlist.rows;k++){
  131. compGoodcd = grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodcd"));
  132. if(sGoodcd ==compGoodcd){
  133. duplFlag = true;
  134. break;
  135. }else{
  136. duplFlag = false;
  137. }
  138. }
  139. if(duplFlag == true){
  140. messageBox(sGoodcd+"은(는) 이미 등록하신 코드","I009");
  141. }else{
  142. //grd_deptwinlist.addRow(false);
  143. model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/goodcd" ,sGoodcd);
  144. model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/goodnm" ,sGoodnm);
  145. model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/purcunit" ,sPurcunit);
  146. model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/goodspec" ,sGoodspec);
  147. model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/winunitcost" ,sWinunitcost);
  148. }
  149. }
  150. grd_deptwinlist.refresh();
  151. }
  152. function fGetGoodDetail() {
  153. for(var k = 1; k <= instance1.selectNodes("/root/popgood/goodlist").length; k++) {
  154. var bDup = false; //물품코드가 중복되었는지를 확인하기 위한 변수
  155. //popup에서 선택한 물품코드가 이미 grid에 존재하고 있는지를 check하여 이미 존재하면 message를 보여주고 return한다.
  156. // for(var i = 1; i < grd_deptwinlist.rows; i++) {
  157. // if( grd_deptwinlist.valueMatrix(i, grd_deptwinlist.colRef("goodcd")) == model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") ) {
  158. // messageBox("물품코드가 중복되었습니다. [" + grd_deptwinlist.valueMatrix(i, grd_deptwinlist.colRef("goodcd")) + "] ", "E999", ""); //E: 경고
  159. // bDup = true;
  160. // continue;
  161. // }
  162. // }
  163. if( bDup == false ) {
  164. // node 삭제
  165. //model.removenode("/root/main/gooddetail");
  166. //TRRSO20104를 위해 물품코드를 goodcd에 넣는다.
  167. model.setValue( "/root/popgood/goodcd", model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") );
  168. if( submit("TRRSO20104") ) {
  169. /* model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/instcd", model.getValue("/root/send/search/instcd"));
  170. model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/delivedd", model.getValue("/root/send/search/delivedd"));
  171. //model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/deliveno", model.getValue("/root/send/search/deliveno"));
  172. //model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/deliveseq", model.getValue("/root/send/search/deliveseq"));
  173. model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/wareflag", model.getValue("/root/send/search/wareflag"));
  174. model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/delivedeptcd", model.getValue("/root/send/search/delivedeptcd"));
  175. */
  176. //마직막 행에 물품코드가 등록되어 있으면 그 행에 바로 적용하고, 물품코드가 없으면 한 행을 추가한 뒤 적용한다.
  177. if( grd_deptwinlist.valueMatrix(grd_deptwinlist.rows-1, grd_deptwinlist.colRef("goodcd")) != "" ) {
  178. btn_rowinsert.dispatch("DOMActivate");
  179. }
  180. model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/goodcd", model.getValue("/root/main/good/gooddetail/goodcd"));
  181. model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/goodnm", model.getValue("/root/main/good/gooddetail/goodnm"));
  182. model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/goodspec", model.getValue("/root/main/good/gooddetail/goodspec"));
  183. model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/purcunit", model.getValue("/root/main/good/gooddetail/deliveunit"));
  184. model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/wareflag", model.getValue("/root/main/good/gooddetail/wareflag"));
  185. // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/exchqty", model.getValue("/root/main/good/gooddetail/exchqty"));
  186. // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/siqty", model.getValue("/root/main/good/gooddetail/siqty"));
  187. // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/hunqty", model.getValue("/root/main/good/gooddetail/hunqty"));
  188. if(model.getValue("/root/main/good/gooddetail/goodunitcost") == ""){
  189. model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/winunitcost", 0);
  190. }else{
  191. model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/winunitcost", model.getValue("/root/main/good/gooddetail/goodunitcost"));
  192. }
  193. // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/origsiqty", model.getValue("/root/main/good/gooddetail/siqty")); //hunqty의 처음 값을 저장하기 위함.
  194. // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/orighunqty", model.getValue("/root/main/good/gooddetail/hunqty")); //hunqty의 처음 값을 저장하기 위함.
  195. // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/deliveqty", "");
  196. // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/deliveamt", "");
  197. model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/winqty", "0"); //입고수량
  198. model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/winamt", "0");
  199. }
  200. } // if( bDup ...) end
  201. } // for(var k ...) end
  202. grd_deptwinlist.refresh();
  203. }
  204. ]]>
  205. </script>
  206. </xhtml:head>
  207. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  208. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  209. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">입고등록(부서재고)</caption>
  210. </group>
  211. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  212. <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1195px; y2:25px; "/>
  213. <button id="btn_save" class="btn4_letter2" navindex="12" style="left:1138px; top:3px; width:56px; height:22px; ">
  214. <caption>저장</caption>
  215. <script type="javascript" ev:event="DOMActivate">
  216. <![CDATA[
  217. if(grd_deptwinlist.rows != 1){
  218. var instcd = grd_deptwinlist.valueMatrix(1, grd_deptwinlist.colRef("instcd"));
  219. var dd = grd_deptwinlist.valueMatrix(1, grd_deptwinlist.colRef("windd"));
  220. var deptcd = grd_deptwinlist.valueMatrix(1, grd_deptwinlist.colRef("windeptcd"));
  221. if(instcd == ""){
  222. model.setValue("/root/magamsearch/instcd", model.getValue("/root/cond/instcd"));
  223. model.setValue("/root/magamsearch/dd", model.getValue("/root/cond/windd"));
  224. model.setValue("/root/magamsearch/deptcd", model.getValue("/root/cond/windeptcd"));
  225. }else{
  226. model.setValue("/root/magamsearch/instcd", instcd);
  227. model.setValue("/root/magamsearch/dd", dd);
  228. model.setValue("/root/magamsearch/deptcd", deptcd);
  229. }
  230. cap_magam.value = "";
  231. if(submit("TRRSO21003")){
  232. var endyn = model.getValue("/root/distrimagam/endyn");
  233. if(endyn == "Y"){
  234. cap_magam.value = "물류마감이 되어있습니다.";
  235. messageBox("물류마감이 되어 저장이 불가능합니다.", "E999", "");
  236. return;
  237. }else{
  238. cap_magam.value = "";
  239. if(submit("TRRSO21002")){
  240. var magamyn = model.getValue("/root/magam/magamyn");
  241. if(magamyn == "Y"){
  242. cap_magam.value = "해당부서는 현재 마감되어있습니다.";
  243. messageBox("해당부서는 마감이 되어 저장이 불가능합니다.", "E999", "");
  244. return;
  245. }else{
  246. cap_magam.value = "";
  247. }
  248. }else{
  249. return;
  250. }//if(submit("TRRSO21002")){
  251. }//if(endyn == "Y"){
  252. }else{
  253. return;
  254. }//if(submit("TRRSO21003")){
  255. }else{
  256. return;
  257. }//if(grd_deptwinlist.rows != 1){
  258. for(var k =grd_deptwinlist.fixedRows;k < grd_deptwinlist.rows;k++ ){
  259. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("instcd")) = model.getValue("/root/cond/instcd");
  260. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("windd")) = model.getValue("/root/cond/windd");
  261. //grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winkind")) = model.getValue("/root/cond/winkind");
  262. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("reqdeptcd")) = model.getValue("/root/cond/reqdeptcd");
  263. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("windeptcd")) = model.getValue("/root/cond/windeptcd");
  264. //2012.03.07 박준범 - 저장시 모든 행의 컬럼값이 null인 경우에는 행을 삭제한 후 저장한다.
  265. if( grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodcd")) == "" &&
  266. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodnm")) == "" &&
  267. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winqty")) == "" &&
  268. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winunitcost")) == "" ) {
  269. grd_deptwinlist.deleteRow(k); //행삭제
  270. k--; //삭제 후 총건수가 줄어들므로
  271. };
  272. }
  273. //2012.03.07 박준범 - 물품코드와 출고수량이 정상적으로 입력되었는지 확인한다.
  274. for(var k =grd_deptwinlist.fixedRows;k < grd_deptwinlist.rows;k++ ){
  275. if ( grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodcd")) == "" ||
  276. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodnm")) == "" ||
  277. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winqty")) == "" ||
  278. grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winunitcost")) == "" ) {
  279. messageBox("내역이 정상적으로 입력되지 않았습니다. \n\n입력한 값을 확인하십시요. ", "E999", "");
  280. model.setFocus("grd_deptwinlist");
  281. grd_deptwinlist.row = k;
  282. return;
  283. };
  284. }
  285. model.makeValue("/root/send/savedata/deptwinlist",grd_deptwinlist.getUpdateData())
  286. if( submit("TXRSO21001") ) {
  287. model.removeNodeset("/root/send/savedata");
  288. btn_search.dispatch("DOMActivate");
  289. }
  290. ]]>
  291. </script>
  292. </button>
  293. <button id="btn_help" class="btn4_letter3" navindex="12" style="left:1070px; top:3px; width:68px; height:22px; ">
  294. <caption>도움말</caption>
  295. <script type="javascript" ev:event="DOMActivate">
  296. <![CDATA[
  297. window.load("SMRSO21001.xrw", "modeless","", "", "","");
  298. ]]>
  299. </script>
  300. </button>
  301. </group>
  302. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  303. <group id="grp_search" style="left:0px; top:9px; width:1195px; height:66px; vertical-align:top; ">
  304. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
  305. <button id="btn_search" class="btn1_letter2" navindex="8" style="left:1114px; top:19px; width:56px; height:22px; ">
  306. <caption>조회</caption>
  307. <script type="javascript" ev:event="DOMActivate">
  308. <![CDATA[
  309. if(ipt_reqdeptcd.value == "") {
  310. messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  311. model.setFocus("ipt_reqdeptcd");
  312. return;
  313. };
  314. if(ipt_windeptcd.value == "") {
  315. messageBox("입고부서가 선택되지 않았습니다. \n\n먼저 입고부서를 선택하십시요.", "E999", "");
  316. model.setFocus("ipt_windeptcd");
  317. return;
  318. };
  319. misfGridInit(grd_deptwinlist);
  320. if(submit("TRRSO21001")){
  321. model.setValue("/root/magamsearch/instcd", model.getValue("/root/cond/instcd"));
  322. model.setValue("/root/magamsearch/dd", model.getValue("/root/cond/windd"));
  323. model.setValue("/root/magamsearch/deptcd", model.getValue("/root/cond/windeptcd"));
  324. cap_magam.visible = "";
  325. if(submit("TRRSO21003")){
  326. var endyn = model.getValue("/root/distrimagam/endyn");
  327. if(endyn == "Y"){
  328. cap_magam.value = "물류마감이 되어있습니다.";
  329. }else{
  330. cap_magam.value = "";
  331. if(submit("TRRSO21002")){
  332. var magamyn = model.getValue("/root/magam/magamyn");
  333. if(magamyn == "Y"){
  334. cap_magam.value = "해당부서는 현재 마감되어있습니다.";
  335. }else{
  336. cap_magam.value = "";
  337. }
  338. }else{
  339. return;
  340. }
  341. }
  342. }else{
  343. return;
  344. }
  345. }else{
  346. return;
  347. }
  348. ]]>
  349. </script>
  350. </button>
  351. <select1 id="cmb_instcd" ref="/root/cond/instcd" class="combo_default" disabled="true" navindex="1" appearance="minimal" style="left:117px; top:10px; width:136px; height:19px; text-align:center; ">
  352. <choices>
  353. <itemset nodeset="/root/main/init">
  354. <label ref="cnstnm"/>
  355. <value ref="cnstcd"/>
  356. </itemset>
  357. </choices>
  358. </select1>
  359. <caption id="cap_instcd" class="search_name" style="left:33px; top:10px; width:86px; height:17px; ">기관코드:</caption>
  360. <input id="ipt_windd" ref="/root/cond/windd" navindex="2" inputtype="date" format="yyyy-mm-dd" style="left:422px; top:10px; width:139px; height:19px; text-align:center; ">
  361. <script type="javascript" ev:event="xforms-value-changed">
  362. <![CDATA[
  363. //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
  364. if(grd_deptwinlist.rows > grd_deptwinlist.fixedRows) {
  365. misfGridInit(grd_deptwinlist);
  366. }
  367. ]]>
  368. </script>
  369. </input>
  370. <caption id="caption20" class="search_name" style="left:661px; top:10px; width:81px; height:17px; vertical-align:middle; ">요구부서:</caption>
  371. <line id="line30" class="line_4" style="x1:1100px; y1:13px; x2:1100px; y2:45px; "/>
  372. <button id="btn_delivedeptcd" class="icon_search" navindex="5" style="left:853px; top:10px; width:16px; height:16px; ">
  373. <caption/>
  374. <script type="javascript" ev:event="DOMActivate">
  375. <![CDATA[
  376. var vOrigDeptcd = ipt_reqdeptcd.value; //popup을 열기전 부서 저장
  377. var recv_list = "reqdeptcd,reqdeptnm";
  378. misfOpenPopUpList("02", ipt_reqdeptcd,"", recv_list) ;
  379. model.setValue("/root/cond/windeptcd", model.getValue("/root/cond/reqdeptcd"));
  380. model.setValue("/root/cond/windeptnm", model.getValue("/root/cond/reqdeptnm"));
  381. ipt_reqdeptcd.refresh();
  382. opt_reqdeptnm.refresh();
  383. ipt_windeptcd.refresh();
  384. opt_windeptnm.refresh();
  385. ]]>
  386. </script>
  387. </button>
  388. <input id="ipt_reqdeptcd" ref="/root/cond/reqdeptcd" class="input_default" navindex="4" style="left:746px; top:10px; width:105px; height:19px; ">
  389. <script type="javascript" ev:event="xforms-value-changed">
  390. <![CDATA[
  391. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  392. model.setValue("/root/cond/windeptcd", model.getValue("/root/cond/reqdeptcd"));
  393. model.setValue("/root/cond/windeptnm", model.getValue("/root/cond/reqdeptnm"));
  394. //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
  395. if(grd_deptwinlist.rows > grd_deptwinlist.fixedRows) {
  396. misfGridInit(grd_deptwinlist);
  397. }
  398. ipt_reqdeptcd.refresh();
  399. opt_reqdeptnm.refresh();
  400. ipt_windeptcd.refresh();
  401. opt_windeptnm.refresh();
  402. ]]>
  403. </script>
  404. <script type="javascript" ev:event="onkeypress">
  405. <![CDATA[
  406. //2012.04.05 박준범 추가
  407. inputEnterKey("ipt_reqdeptcd", "xforms-value-changed");
  408. ]]>
  409. </script>
  410. </input>
  411. <output id="opt_reqdeptnm" ref="/root/cond/reqdeptnm" class="output_fix" appearance="output" style="left:871px; top:10px; width:156px; height:19px; "/>
  412. <caption id="caption9" class="search_name" style="left:336px; top:10px; width:86px; height:17px; ">입고일자:</caption>
  413. <caption id="caption3" class="search_name" style="left:336px; top:35px; width:80px; height:17px; vertical-align:middle; ">입고유형</caption>
  414. <select1 id="cmb_winkind" ref="/root/cond/winkind" class="combo_default" navindex="3" appearance="minimal" style="left:422px; top:35px; width:139px; height:19px; text-align:center; ">
  415. <choices>
  416. <itemset>
  417. <label/>
  418. <value/>
  419. </itemset>
  420. </choices>
  421. <script type="javascript" ev:event="xforms-value-changed">
  422. <![CDATA[
  423. //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
  424. if(grd_deptwinlist.rows > grd_deptwinlist.fixedRows) {
  425. misfGridInit(grd_deptwinlist);
  426. }
  427. ]]>
  428. </script>
  429. </select1>
  430. <input id="ipt_windeptcd" ref="/root/cond/windeptcd" class="input_default" navindex="6" style="left:745px; top:35px; width:105px; height:19px; ">
  431. <script type="javascript" ev:event="xforms-value-changed">
  432. <![CDATA[
  433. misfValidationCheck("02", "", "windeptcd,windeptnm" );
  434. //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
  435. if(grd_deptwinlist.rows > grd_deptwinlist.fixedRows) {
  436. misfGridInit(grd_deptwinlist);
  437. }
  438. ]]>
  439. </script>
  440. <script type="javascript" ev:event="onkeypress">
  441. <![CDATA[
  442. //2012.04.05 박준범 추가
  443. inputEnterKey("ipt_windeptcd", "xforms-value-changed");
  444. ]]>
  445. </script>
  446. </input>
  447. <button id="button1" class="icon_search" navindex="7" style="left:852px; top:35px; width:16px; height:16px; ">
  448. <caption/>
  449. <script type="javascript" ev:event="DOMActivate">
  450. <![CDATA[
  451. var recv_list = "windeptcd,windeptnm";
  452. misfOpenPopUpList("02", ipt_windeptcd,"", recv_list) ;
  453. ipt_windeptcd.refresh();
  454. opt_windeptnm.refresh();
  455. ]]>
  456. </script>
  457. </button>
  458. <output id="opt_windeptnm" ref="/root/cond/windeptnm" class="output_fix" appearance="output" style="left:870px; top:35px; width:156px; height:19px; "/>
  459. <caption id="caption2" class="search_name" style="left:661px; top:35px; width:81px; height:17px; vertical-align:middle; ">입고부서:</caption>
  460. </group>
  461. <line id="line1" class="line_1" style="x1:0px; y1:108px; x2:1195px; y2:108px; "/>
  462. <caption id="caption1" class="tit_2" style="left:0px; top:93px; width:180px; height:13px; ">입고내역</caption>
  463. <button id="btn_rowinsert" class="btn2_letter3" navindex="10" style="left:1084px; top:87px; width:53px; height:19px; ">
  464. <caption>행추가</caption>
  465. <script type="javascript" ev:event="DOMActivate">
  466. <![CDATA[
  467. if(ipt_reqdeptcd.value == "") {
  468. messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  469. model.setFocus("ipt_reqdeptcd");
  470. return;
  471. };
  472. if(ipt_windeptcd.value == "") {
  473. messageBox("입고부서가 선택되지 않았습니다. \n\n먼저 입고부서를 선택하십시요.", "E999", "");
  474. model.setFocus("ipt_windeptcd");
  475. return;
  476. };
  477. misfGridIUD(grd_deptwinlist, "A");
  478. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("gubun")) = "_";
  479. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winkind")) = cmb_winkind.value;
  480. ]]>
  481. </script>
  482. </button>
  483. <button id="btn_choidel" class="btn2_letter4" navindex="11" visibility="visible" style="left:932px; top:87px; width:64px; height:19px; ">
  484. <caption>전체삭제</caption>
  485. <script type="javascript" ev:event="DOMActivate">
  486. <![CDATA[
  487. var req = messageBox("입고내역이 전체삭제됩니다.", "Q003");
  488. if(req == 6){
  489. if(grd_deptwinlist.rows == "1") return;
  490. //misfGridIUD(grd_deptwinlist, "D");
  491. //2012.03.07 박준범 - 위의 1줄 comment처리하고 아래와 같이 변경
  492. /*
  493. - 0 : read : 조회시
  494. - 1 : insert : 행추가시
  495. - 2 : update : 조회한 것을 수정시
  496. - 3 : insert & new : 행추가한 것을 수정시
  497. - 4 : delete
  498. - 5 : delete & insert
  499. - 6 : delete & update
  500. */
  501. // var status = grd_deptwinlist.rowStatus(grd_deptwinlist.row) ;
  502. //
  503. // if(status == 0) {
  504. // grd_deptwinlist.addStatus(grd_deptwinlist.row, "delete");
  505. // }else if(status == 1) {
  506. // grd_deptwinlist.deleteRow(grd_deptwinlist.row);
  507. // }else if(status == 2) {
  508. // grd_deptwinlist.addStatus(grd_deptwinlist.row, "delete");
  509. // }else if(status == 3) {
  510. // grd_deptwinlist.deleteRow(grd_deptwinlist.row);
  511. // }else if(status == 4) {
  512. // grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
  513. // }else if(status == 5) { // insert된 data는 삭제시 위에서 addStatus("delete")하지 않고, 바로 deleteRow했기 때문에 5의 경우는 발생하지 않음.
  514. // grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
  515. // }else if(status == 6) {
  516. // grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
  517. // }
  518. for(i = 1 ; i < grd_deptwinlist.rows ; i++){
  519. grd_deptwinlist.row = i;
  520. misfGridIUD(grd_deptwinlist, "D");
  521. }
  522. btn_save.dispatch("DOMActivate");
  523. }else{
  524. return;
  525. }
  526. ]]>
  527. </script>
  528. </button>
  529. <datagrid id="grd_deptwinlist" nodeset="/root/main/list/deptwininfo/deptwinlist" class="datagrid2" caption="순서^입고번호^입고유형^품목코드^품목명^단위^규격^입고수량^입고단가^입고금액^기관코드^요구부서^입고부서^마감여부^입고일자^입고유형^caption1^caption2^caption3^caption4" colsep="^" colwidth="43, 59, 100, 103, 303, 89, 166, 80, 100, 112, 61, 52, 53, 54, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" navindex="9" style="left:0px; top:113px; width:1195px; height:612px; ">
  530. <col ref="row_num" style="text-align:center; "/>
  531. <col disabled="true" ref="winno" style="text-align:center; "/>
  532. <col ref="winkind" type="combo" style="text-align:center; ">
  533. <choices>
  534. <itemset>
  535. <label/>
  536. <value/>
  537. </itemset>
  538. </choices>
  539. </col>
  540. <col ref="goodcd" type="inputbutton" style="text-align:center; "/>
  541. <col ref="goodnm"/>
  542. <col ref="purcunit" style="text-align:center; "/>
  543. <col ref="goodspec"/>
  544. <col ref="winqty" type="input" format="(-)#,###.##" style="text-align:right; "/>
  545. <col ref="winunitcost" type="input" format="#,###" style="left:855px; top:23px; width:100px; height:23px; text-align:right; "/>
  546. <col ref="winamt" format="(-)#,###" style="text-align:right; "/>
  547. <col ref="instcd" visibility="hidden"/>
  548. <col ref="reqdeptcd" visibility="hidden"/>
  549. <col ref="windeptcd" visibility="hidden"/>
  550. <col ref="endyn" visibility="hidden"/>
  551. <col ref="windd" visibility="hidden"/>
  552. <col ref="wareflag" visibility="hidden"/>
  553. <col ref="genrno" visibility="hidden"/>
  554. <col ref="genrdd" visibility="hidden"/>
  555. <col ref="genrseq" visibility="hidden"/>
  556. <col ref="gubun" visibility="hidden"/>
  557. <col ref="deliveyn" visibility="hidden"/>
  558. <col ref="instid" visibility="hidden"/>
  559. <col ref="ccdflag" visibility="hidden"/>
  560. <script type="javascript" ev:event="onbuttonclick">
  561. <![CDATA[
  562. //조회된 data 의 경우에는 물품코드를 변경할 수 없다.
  563. if(grd_deptwinlist.rowStatus(grd_deptwinlist.row) == 0 || grd_deptwinlist.rowStatus(grd_deptwinlist.row) == 2) { //0:read, 1:insert, 2:update, 3:update after insert
  564. //alert("onentercell");
  565. return;
  566. }
  567. // //2012.04.05 박준범 - 입고일자를 popup 에 넘겨주도록 수정
  568. // //modal("SPRSO20600");
  569. // model.setValue("/root/popdata/srchdd", ipt_windd.value);
  570. // window.load("SPRSO20600.xrw", "modal","", "", "/root/popdata","/root/popdata");
  571. //popup 에 전달할 parameter를 setting한다.
  572. model.setValue("/root/popgood/instcd", cmb_instcd.value);
  573. model.setValue("/root/popgood/delivedd", ipt_windd.value ); //향후 시점재고 조회를 위해 출고일자를 set
  574. //2012.09.17 박준범 - SPRSO20700.xrw 에서 사용하기 위해 basedd를 추가 함
  575. model.setValue("/root/popgood/basedd", ipt_windd.value ); //물품코드 popup 에서 출고일자 기준으로 물품 Master 조회하기 위해서
  576. //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
  577. model.setValue("/root/popgood/selectyn", "");
  578. //popup 프로그램 호출
  579. //window.load("SPRSO20300.xrw", "modal","", "", "/root/popgood","/root/popdata"); //단일선택창
  580. window.load("SPRSO20700.xrw", "modal","", "", "/root/popgood","/root/popdata"); //다중선택창
  581. //popup에서 특정 물품코드를 선택한 경우, 해당 물품코드에 대한 상세 사항을 조회해서 그리드에 보여준다.
  582. if(model.getValue("/root/popgood/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
  583. fGetGoodDetail(); //물품코드의 상세내역과 현재고를 조회하여 Grid에 보여줌
  584. //출고량을 입력하도록 focus이동
  585. grd_deptwinlist.col = grd_deptwinlist.colRef("winqty");
  586. }
  587. ]]>
  588. </script>
  589. <script type="javascript" ev:event="xforms-value-changed">
  590. <![CDATA[
  591. /* 2012.03.06 박준범 - 아래 전체 comment처리하고, 하단에 다시 구현
  592. var pRow = grd_deptwinlist.row - grd_deptwinlist.fixedRows + 1;
  593. var winqty = grd_deptwinlist.valueMatrix(pRow,grd_deptwinlist.colRef("winqty"));
  594. var winunitcost = grd_deptwinlist.valueMatrix(pRow,grd_deptwinlist.colRef("winunitcost"));
  595. if((grd_deptwinlist.col== grd_deptwinlist.colRef("winqty"))||(grd_deptwinlist.col== grd_deptwinlist.colRef("winunitcost"))){
  596. grd_deptwinlist.valueMatrix(pRow,grd_deptwinlist.colRef("winamt")) = (winqty*winunitcost);
  597. }
  598. grd_deptwinlist.refresh();
  599. */
  600. if( grd_deptwinlist.col == grd_deptwinlist.colRef("winqty") || grd_deptwinlist.col == grd_deptwinlist.colRef("winunitcost") ){
  601. if( grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) == "" ||
  602. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) == "." ||
  603. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) == "-" ||
  604. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) == "-." ){
  605. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) = "0";
  606. } else {
  607. /* DB의 컬럼이 소수점 2자리 이므로, 이와 통일하기 위해 화면에서 소수 2자리까지만 입력 받도록 처리 */
  608. var sBef = grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty"));
  609. var iIndex = sBef.indexOf(".");
  610. if (iIndex >= 0 ) { // 소수점이 있으면~
  611. var sAft = sBef.substring(0, iIndex + 3); //소수점 2자리까지 잘라내기 위해 소수점 포함 3자리를 더함
  612. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) = sAft;
  613. }
  614. }
  615. if( grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winunitcost")) == "" ){
  616. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winunitcost")) = "0";
  617. }
  618. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winamt")) =
  619. //입고금액은 반올림처리
  620. Math.round(grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) *
  621. grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winunitcost")) );
  622. }
  623. grd_deptwinlist.refresh();
  624. ]]>
  625. </script>
  626. </datagrid>
  627. <button id="btn_chulpop" class="btn2_letter6" navindex="10" visibility="visible" style="left:997px; top:87px; width:86px; height:19px; ">
  628. <caption>입고대기조회</caption>
  629. <script type="javascript" ev:event="DOMActivate">
  630. <![CDATA[
  631. if(ipt_reqdeptcd.value == "") {
  632. messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  633. model.setFocus("ipt_reqdeptcd");
  634. return;
  635. };
  636. //popup 에 전달할 parameter를 setting한다.
  637. model.setValue("/root/popdelive/instcd", cmb_instcd.value);
  638. model.setValue("/root/popdelive/delivedd", ipt_windd.value);
  639. model.setValue("/root/popdelive/delivedeptcd", ipt_reqdeptcd.value);
  640. model.setValue("/root/popdelive/delivedeptnm", opt_reqdeptnm.value);
  641. model.setValue("/root/popdelive/opener", "in");
  642. //갯수초기화
  643. model.setValue("/root/popreq/count", 0);
  644. //popup 프로그램 호출
  645. window.load("SMRSO21050.xrw", "modal","", "", "/root/popdelive","/root/popdata");
  646. var cnt = model.getValue("/root/popreq/count");
  647. if(cnt == 0){
  648. return;
  649. }
  650. //그리드초기화
  651. misfGridInit(grd_deptwinlist);
  652. grd_deptwinlist.refresh();
  653. var mrows = grd_deptwinlist.rows;
  654. var mcnt = parseInt(mrows)+parseInt(cnt);
  655. var j = 1;
  656. for(i = mrows ; i <= mcnt-1 ; i++){
  657. misfGridIUD(grd_deptwinlist, "A");
  658. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodcd", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodcd")); //물품코드
  659. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodnm", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodnm")); //물품명
  660. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/purcunit", model.getValue("/root/popsubdata/delivedtllist["+j+"]/deliveunit")); //단위
  661. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodspec", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodspec")); //규격
  662. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winunitcost", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodunitcost")); //입고단가
  663. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/wareflag", model.getValue("/root/popsubdata/delivedtllist["+j+"]/wareflag")); //창고구분
  664. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winqty", model.getValue("/root/popsubdata/delivedtllist["+j+"]/deliveqty")); //입고수량
  665. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/instid", model.getValue("/root/popsubdata/delivedtllist["+j+"]/instid")); //삭제키
  666. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winamt",
  667. Math.round(model.getValue("/root/popsubdata/delivedtllist["+j+"]/deliveqty") * model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodunitcost"))); //입고금액 계산
  668. //선불출 적용을 위한 키값
  669. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/instcd", model.getValue("/root/popsubdata/delivedtllist["+j+"]/instcd")); //기관
  670. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrdd", model.getValue("/root/popsubdata/delivedtllist["+j+"]/genrdd")); //발생일자
  671. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrno", model.getValue("/root/popsubdata/delivedtllist["+j+"]/genrno")); //발생번호
  672. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrseq", model.getValue("/root/popsubdata/delivedtllist["+j+"]/genrseq")); //발생순번
  673. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/gubun", model.getValue("/root/popsubdata/delivedtllist["+j+"]/gubun")); //발생순번
  674. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/ccdflag", model.getValue("/root/popsubdata/delivedtllist["+j+"]/ccdflag")); //CCD 분류
  675. var gubun = model.getValue("/root/popsubdata/delivedtllist["+j+"]/gubun");
  676. if(gubun == "1"){
  677. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winkind", "01"); //입고유형
  678. }else if(gubun=="2"||gubun=="3"){
  679. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winkind", "04"); //입고유형
  680. }
  681. grd_deptwinlist.cellAttribute("disabled", i, grd_deptwinlist.colRef("winqty"), i, grd_deptwinlist.colRef("winqty")) = "true";
  682. j++;
  683. }
  684. // if(j > 1){
  685. // btn_chulpop.disabled = true;
  686. // }
  687. grd_deptwinlist.refresh();
  688. ipt_windd.refresh();
  689. ]]>
  690. </script>
  691. </button>
  692. <button id="button2" class="btn2_letter3" navindex="11" style="left:1138px; top:87px; width:53px; height:19px; ">
  693. <caption>행삭제</caption>
  694. <script type="javascript" ev:event="DOMActivate">
  695. <![CDATA[
  696. // misfGridIUD(grd_deptwinlist, "D");
  697. var status = grd_deptwinlist.rowStatus(grd_deptwinlist.row) ;
  698. if(status == 0) {
  699. grd_deptwinlist.addStatus(grd_deptwinlist.row, "delete");
  700. }else if(status == 1) {
  701. grd_deptwinlist.deleteRow(grd_deptwinlist.row);
  702. }else if(status == 2) {
  703. grd_deptwinlist.addStatus(grd_deptwinlist.row, "delete");
  704. }else if(status == 3) {
  705. grd_deptwinlist.deleteRow(grd_deptwinlist.row);
  706. }else if(status == 4) {
  707. grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
  708. }else if(status == 5) {
  709. grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
  710. }else if(status == 6) {
  711. grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
  712. }
  713. ]]>
  714. </script>
  715. </button>
  716. <button id="btn_bfdelive" class="btn2_letter5" navindex="10" visibility="hidden" style="left:921px; top:77px; width:75px; height:19px; ">
  717. <caption>선불출입고</caption>
  718. <script type="javascript" ev:event="DOMActivate">
  719. <![CDATA[
  720. if(ipt_reqdeptcd.value == "") {
  721. messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  722. model.setFocus("ipt_reqdeptcd");
  723. return;
  724. };
  725. //popup 에 전달할 parameter를 setting한다.
  726. model.setValue("/root/popdelive/instcd", cmb_instcd.value);
  727. model.setValue("/root/popdelive/delivedd", ipt_windd.value);
  728. model.setValue("/root/popdelive/delivedeptcd", ipt_reqdeptcd.value);
  729. model.setValue("/root/popdelive/delivedeptnm", opt_reqdeptnm.value);
  730. model.setValue("/root/popdelive/opener", "in");
  731. //갯수초기화
  732. model.setValue("/root/popreq/count", 0);
  733. //popup 프로그램 호출
  734. window.load("SMRSO21060.xrw", "modal","", "", "/root/popdelive","/root/popdata");
  735. var cnt = model.getValue("/root/popreq/count");
  736. var mrows = grd_deptwinlist.rows;
  737. var mcnt = parseInt(mrows)+parseInt(cnt);
  738. var j = 1;
  739. for(i = mrows ; i <= mcnt-1 ; i++){
  740. misfGridIUD(grd_deptwinlist, "A");
  741. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodcd", model.getValue("/root/popsubdata/bfdelive["+j+"]/goodcd")); //물품코드
  742. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodnm", model.getValue("/root/popsubdata/bfdelive["+j+"]/goodnm")); //물품명
  743. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/purcunit", model.getValue("/root/popsubdata/bfdelive["+j+"]/purcunit")); //단위
  744. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodspec", model.getValue("/root/popsubdata/bfdelive["+j+"]/goodspec")); //규격
  745. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winunitcost", model.getValue("/root/popsubdata/bfdelive["+j+"]/goodunitcost")); //입고단가
  746. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/wareflag", model.getValue("/root/popsubdata/bfdelive["+j+"]/wareflag")); //창고구분
  747. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winqty", model.getValue("/root/popsubdata/bfdelive["+j+"]/beforqty")); //입고수량
  748. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winamt",
  749. Math.round(model.getValue("/root/popsubdata/delivedtllist["+j+"]/deliveqty") * model.getValue("/root/popsubdata/bfdelive["+j+"]/goodunitcost"))); //입고금액 계산
  750. //선불출 적용을 위한 키값
  751. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/instcd", model.getValue("/root/popsubdata/bfdelive["+j+"]/instcd")); //기관
  752. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrdd", model.getValue("/root/popsubdata/bfdelive["+j+"]/genrdd")); //발생일자
  753. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrno", model.getValue("/root/popsubdata/bfdelive["+j+"]/genrno")); //발생번호
  754. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrseq", model.getValue("/root/popsubdata/bfdelive["+j+"]/genrseq")); //발생순번
  755. j++;
  756. }
  757. grd_deptwinlist.refresh();
  758. ]]>
  759. </script>
  760. </button>
  761. <button id="btn_prcpsum" class="btn2_letter4" navindex="10" visibility="hidden" style="left:856px; top:77px; width:64px; height:19px; ">
  762. <caption>처방집계</caption>
  763. <script type="javascript" ev:event="DOMActivate">
  764. <![CDATA[
  765. if(ipt_reqdeptcd.value == "") {
  766. messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
  767. model.setFocus("ipt_reqdeptcd");
  768. return;
  769. };
  770. //popup 에 전달할 parameter를 setting한다.
  771. model.setValue("/root/popdelive/instcd", cmb_instcd.value);
  772. model.setValue("/root/popdelive/delivedd", ipt_windd.value);
  773. model.setValue("/root/popdelive/delivedeptcd", ipt_reqdeptcd.value);
  774. model.setValue("/root/popdelive/delivedeptnm", opt_reqdeptnm.value);
  775. model.setValue("/root/popdelive/opener", "jaego");
  776. //갯수초기화
  777. model.setValue("/root/popreq/count", 0);
  778. //popup 프로그램 호출
  779. window.load("SMRSO21460.xrw", "modal","", "", "/root/popdelive","/root/popdata");
  780. var cnt = model.getValue("/root/popreq/count");
  781. var mrows = grd_deptwinlist.rows;
  782. var mcnt = parseInt(mrows)+parseInt(cnt);
  783. var j = 1;
  784. for(i = mrows ; i <= mcnt-1 ; i++){
  785. misfGridIUD(grd_deptwinlist, "A");
  786. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodcd", model.getValue("/root/popsubdata/prcpsum["+j+"]/goodcd")); //물품코드
  787. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodnm", model.getValue("/root/popsubdata/prcpsum["+j+"]/goodnm")); //물품명
  788. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/deliveunit", model.getValue("/root/popsubdata/prcpsum["+j+"]/purcunit")); //단위
  789. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodspec", model.getValue("/root/popsubdata/prcpsum["+j+"]/goodspec")); //규격
  790. //model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/winunitcost", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodunitcost")); //입고단가
  791. //model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/wareflag", model.getValue("/root/popsubdata/delivedtllist["+j+"]/wareflag")); //창고구분
  792. model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/hun_jaego", model.getValue("/root/popsubdata/prcpsum["+j+"]/deliveqty")); //현재고수량
  793. j++;
  794. }
  795. grd_deptwinlist.refresh();
  796. ]]>
  797. </script>
  798. </button>
  799. <caption id="cap_magam" style="left:240px; top:80px; width:395px; height:20px; font-size:12pt; font-weight:bold; color:#ff0000; text-align:center; "/>
  800. </group>
  801. </xhtml:body>
  802. </xhtml:html>