SMRSI03300_성의교정입고등록.xrw 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>입고관리(성의교정)</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <goodwin>
  12. <goodwinlist/>
  13. <goodmaxwinno/>
  14. </goodwin>
  15. <gooddmndreq>
  16. <gooddmndreqlist/>
  17. </gooddmndreq>
  18. <goodnonwin>
  19. <goodnonwinlist/>
  20. <goodmaxwinno/>
  21. </goodnonwin>
  22. </list>
  23. <item/>
  24. </main>
  25. <send>
  26. <save>
  27. <goodwinlist/>
  28. <goodnonwinlist/>
  29. <interfacecustcdlist>
  30. <purc_main_suplplcecd/>
  31. <purc_main_suplplcecd3/>
  32. <purc_main_suplplcecd2/>
  33. <drg_main_suplplcecd/>
  34. </interfacecustcdlist>
  35. </save>
  36. <goodwin>
  37. <instcd/>
  38. <goodflag/>
  39. <windd/>
  40. <winno/>
  41. <windeptcd/>
  42. <windeptnm/>
  43. <winpsn/>
  44. <winpsnnm/>
  45. <paycond>1</paycond>
  46. <suplplcecd/>
  47. <suplplcenm/>
  48. <calcdocukind/>
  49. <elctstmntyn/>
  50. <calcdocudd/>
  51. <purcdmndfrdd/>
  52. <purcdmndtodd/>
  53. <addtax/>
  54. <retrmaxwinnoyn/>
  55. <iokind/>
  56. <interfacegubn/>
  57. <subsuplplcecd/>
  58. <subsuplplcenm/>
  59. <purcflag/>
  60. <cntctel/>
  61. <prsdnm/>
  62. <reqpsn/>
  63. <reqpsnnm/>
  64. <winfrdd/>
  65. <wintodd/>
  66. <purcdmndd/>
  67. <purcdmnno/>
  68. <goodcd/>
  69. <goodnm/>
  70. <winpsnyn/>
  71. </goodwin>
  72. <gooddmndreq>
  73. <instcd/>
  74. <goodflag/>
  75. <purcdmnddd/>
  76. <purcdmndno/>
  77. <purcdmndseq/>
  78. <reqdeptcd/>
  79. </gooddmndreq>
  80. <savenonwin>
  81. <goodnonwinlist/>
  82. <interfacecustcdlist>
  83. <purc_main_suplplcecd/>
  84. <purc_main_suplplcecd2/>
  85. <purc_main_suplplcecd3/>
  86. <drg_main_suplplcecd/>
  87. </interfacecustcdlist>
  88. </savenonwin>
  89. <gooddelive>
  90. <gooddelivelist/>
  91. </gooddelive>
  92. </send>
  93. <init>
  94. <temppay>
  95. <label>예</label>
  96. <value>Y</value>
  97. <label>아니오</label>
  98. <value>N</value>
  99. </temppay>
  100. <elctstmntyn>
  101. <label>예</label>
  102. <value>Y</value>
  103. <label>아니오</label>
  104. <value>N</value>
  105. </elctstmntyn>
  106. <paycond>
  107. <label>정상</label>
  108. <value>1</value>
  109. <label>지불필</label>
  110. <value>2</value>
  111. </paycond>
  112. <winqty/>
  113. <winamt/>
  114. <reqcnt/>
  115. <reqamt/>
  116. <winqtytotal>0</winqtytotal>
  117. <winqtycnt>0</winqtycnt>
  118. </init>
  119. <hidden/>
  120. <temp/>
  121. <copynode/>
  122. </root>
  123. </instance>
  124. <bind id="winqty" ref="/root/main/list/goodwin/goodwinlist/winqty" calculate="../winpackqty *../winpackcntperunit"/>
  125. <bind id="winamt" ref="/root/main/list/goodwin/goodwinlist/winamt" calculate="(../winpackqty *../winpackcntperunit) * ../winunitcost"/>
  126. <script type="javascript" ev:event="xforms-ready">
  127. <![CDATA[
  128. //화면 Control을 초기화한다
  129. fCheckAuth();
  130. fInitialize();
  131. ]]>
  132. </script>
  133. <submission id="TRRSI00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodwin"/>
  134. <submission id="TRRSI00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodnonwin"/>
  135. <submission id="TRRSI00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodnonwin"/>
  136. <submission id="TRRSD00403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/gooddmndreq" resultref="/root/main/list/gooddmndreq"/>
  137. <submission id="TXRSI00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/hidden/temp">"</submission>
  138. <submission id="TXRSO00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/gooddelive" resultref="/root/hidden/temp">"</submission>
  139. <submission id="TXRSI00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savenonwin" resultref="/root/hidden/temp">"</submission>
  140. </model>
  141. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  142. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  143. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  144. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  145. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  146. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  147. <script type="javascript">
  148. <![CDATA[
  149. function fInitialize() {
  150. model.resetInstanceNode("/root/send");
  151. //rszfUserGoodFlagList(cmb_goodflag,getUserInfo("userid"));
  152. rszfGoodFlagListByPgmGubn(cmb_goodflag,"1","N");
  153. rszfUserInstList(cmb_instcd,getUserInfo("userid"));
  154. misfComboComCdListMulti("R0109","cmb_calcdocukind");
  155. // 조회가 아닌데 전체는 의미가 없다...HBH . 2007.08.13
  156. //rszfComboAppendBlankChild("cmb_calcdocukind");
  157. // rszfGridComboBugtList(grd_goodwin,"acntcd",getUserInfo("dutplceinstcd"));
  158. misfGridInit(grd_goodwin);
  159. misfGridInit(grd_nonwin);
  160. misfMsterDetailSet(grd_goodwin,null, "TRRSI00101" ,"Y");
  161. misfMsterDetailSet(grd_goodreq,grd_goodwin, "TRRSD00403" ,"N");
  162. var curdate = getCurrentDate();
  163. var cvtdate = curdate.toDate("YYYYMMDD");
  164. model.setValue(ipt_windd.attribute("ref") ,curdate);
  165. model.setValue(ipt_reqfrdd.attribute("ref") ,cvtdate.getAddDate(-10,"D").getDateFormat("YYYYMMDD"));
  166. model.setValue(ipt_reqtodd.attribute("ref") ,curdate);
  167. //입고조회시 입고일자 1주일 간격 기본 설정.
  168. model.setValue(ipt_winfrdd.attribute("ref"), cvtdate.getAddDate(-7, "D").getDateFormat("YYYYMMDD"));
  169. model.setValue(ipt_wintodd.attribute("ref"), curdate);
  170. //hidden
  171. model.setValue(ipt_iokind.attribute("ref"),'1A'); // 입출유형.
  172. model.setValue(opt_interfacegubn.attribute("ref"),'P'); // 'B' 평화드림.
  173. model.setValue(ipt_sumwinqty.attribute("ref"),0);
  174. model.setValue(opt_sumwinamt.attribute("ref"),0);
  175. model.setValue(opt_sumreqqty.attribute("ref"),0);
  176. model.setValue(opt_sumreqfla.attribute("ref"),0);
  177. model.setValue(cmb_instcd.attribute("ref" ), getUserInfo("dutplceinstcd"));
  178. model.setValue(ipt_windeptcd.attribute("ref"), getUserInfo("dutplcecd"));
  179. model.setValue(ipt_windeptnm.attribute("ref"), getUserInfo("dutplcenm"));
  180. model.setValue(ipt_winpsn.attribute("ref" ), getUserInfo("userid"));
  181. model.setValue(opt_winpsnnm.attribute("ref" ), getUserInfo("usernm"));
  182. grd_goodwin.explorerbar = "sortshow";
  183. grd_goodreq.explorerbar = "sortshow";
  184. grd_nonwin.explorerbar = "sortshow";
  185. // rszfGridComboBugtList(grd_nonwin,"acntcd",getUserInfo("dutplceinstcd"));
  186. // rszfGridComboBugtList(grd_goodwin,"acntcd",getUserInfo("dutplceinstcd"));
  187. rszfComboBgcdBugtList("grd_nonwin.groupbugt", getUserInfo("dutplceinstcd"), '1');
  188. rszfComboBgcdBugtList("grd_goodwin.groupbugt", getUserInfo("dutplceinstcd"), '1');
  189. grd_goodwin.frozenCols = grd_goodwin.colRef("winunit");
  190. rdo_paycond.value = "1";
  191. cmb_goodflag.select(0);
  192. model.refresh();
  193. }
  194. function fGetProjectynFocus(fgrid)
  195. {
  196. var temp = null;
  197. var fnode = instance1.selectNodes(fgrid.acntcd.choices.itemset.attribute("nodeset"));
  198. for(var s = 1; s <= fnode.length; s++)
  199. {
  200. if(model.getValue(fgrid.acntcd.choices.itemset.attribute("nodeset") + "["+ s +" ]/bugtcd") == fgrid.valueMatrix(fgrid.row, fgrid.colRef("acntcd")) )
  201. {
  202. return model.getValue(fgrid.acntcd.choices.itemset.attribute("nodeset") + "["+ s +" ]/projectyn");
  203. }
  204. }
  205. return;
  206. }
  207. function fCheckAuth() {
  208. btn_search.disabled = !checkAuth("R") ;
  209. btn_save.disabled = !checkAuth("X") ;
  210. }
  211. /******************************************************
  212. ** 20081110 평화드림으로 부터 입고 Interface 받는 부분 없음
  213. ** 해당 항목 주석처리
  214. ******************************************************/
  215. // 미입고 데이타 load
  216. function fDataLoadNoWin()
  217. {
  218. //messatgebox
  219. /*
  220. submit("TRRSI00103");
  221. for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
  222. {
  223. grd_nonwin.rowStatus(currow) = "2";
  224. }
  225. */
  226. }
  227. function fCheckRetrieveData(pmsg)
  228. {
  229. if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
  230. {
  231. if(pmsg == true)
  232. {
  233. messageBox("기관코드를 " ,"C002");
  234. model.setFocus("cmb_instcd");
  235. }
  236. return false;
  237. }
  238. if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
  239. {
  240. if(pmsg == true)
  241. {
  242. messageBox("물품구분을 " ,"C002");
  243. model.setFocus("cmb_goodflag");
  244. }
  245. return false;
  246. }
  247. // 공급처 제외... 07.11.26 YYJ
  248. /*
  249. if(model.getValue(ipt_suplplcecd.attribute("ref")).length== 0 )
  250. {
  251. if(pmsg == true)
  252. {
  253. messageBox("공급처를 " ,"C001");
  254. model.setFocus("ipt_suplplcecd");
  255. }
  256. return false;
  257. }
  258. */
  259. if(model.getValue(ipt_winpsn.attribute("ref")).length== 0 )
  260. {
  261. if(pmsg == true)
  262. {
  263. messageBox("입고담당자를 " ,"C001");
  264. model.setFocus("ipt_winpsn");
  265. }
  266. return false;
  267. }
  268. if(model.getValue(ipt_windeptcd.attribute("ref")).length== 0 )
  269. {
  270. if(pmsg == true)
  271. {
  272. messageBox("입고부서를 " ,"C001");
  273. model.setFocus("ipt_windeptcd");
  274. }
  275. return false;
  276. }
  277. if(sch_select.selectedIndex == 0)
  278. {
  279. if(model.getValue(ipt_reqfrdd.attribute("ref")).length== 0 )
  280. {
  281. if(pmsg == true)
  282. {
  283. messageBox("발주시작일자 " ,"C001");
  284. model.setFocus("ipt_reqfrdd");
  285. }
  286. return false;
  287. }
  288. if(model.getValue(ipt_reqtodd.attribute("ref")).length== 0 )
  289. {
  290. if(pmsg == true)
  291. {
  292. messageBox("발주종료일자 " ,"C001");
  293. model.setFocus("ipt_reqtodd");
  294. }
  295. return false;
  296. }
  297. return true;
  298. }
  299. else
  300. {
  301. if(model.getValue(ipt_windd.attribute("ref")).length== 0 )
  302. {
  303. if(pmsg == true)
  304. {
  305. messageBox("입고일자를 " ,"C001");
  306. model.setFocus("ipt_windd");
  307. }
  308. return false;
  309. }
  310. }
  311. return true;
  312. }
  313. function fDefaultSetting(prow)
  314. {
  315. var grd_setting;
  316. if(sch_select.selectedIndex == 0)grd_setting = grd_nonwin;
  317. else grd_setting = grd_goodwin;
  318. model.setValue(grd_setting.nodeset+"["+prow+"]/instcd",model.getValue(cmb_instcd.attribute("ref")));
  319. model.setValue(grd_setting.nodeset+"["+prow+"]/goodflag",model.getValue(cmb_goodflag.attribute("ref")));
  320. model.setValue(grd_setting.nodeset+"["+prow+"]/windd",model.getValue(ipt_windd.attribute("ref")));
  321. model.setValue(grd_setting.nodeset+"["+prow+"]/winpsn",model.getValue(ipt_winpsn.attribute("ref")));
  322. model.setValue(grd_setting.nodeset+"["+prow+"]/windeptcd",model.getValue(ipt_windeptcd.attribute("ref")));
  323. model.setValue(grd_setting.nodeset+"["+prow+"]/delivedeptcd" , model.getValue(ipt_windeptcd.attribute("ref")));
  324. // model.setValue(grd_setting.nodeset+"["+prow+"]/installplcecd",model.getValue("/root/send/goodwin/installplcecd"));
  325. model.setValue(grd_setting.nodeset+"["+prow+"]/paycond",model.getValue("/root/send/goodwin/paycond"));
  326. model.setValue(grd_setting.nodeset+"["+prow+"]/temppay",model.getValue("/root/send/goodwin/temppay"));
  327. model.setValue(grd_setting.nodeset+"["+prow+"]/calcdocukind",model.getValue(cmb_calcdocukind.attribute("ref")));;
  328. model.setValue(grd_setting.nodeset+"["+prow+"]/calcdocudd",model.getValue(ipt_calcdocudd.attribute("ref")));
  329. // [20080903 YYJ] 성의교정의 경우 공급처를 지정하지 않아도 선택이 되기 때문에 조건 처리하지 않는다... 공급처 미지정일 경우 공급처 값이 들어가지 않는다..;;
  330. if(model.getValue(ipt_suplplcecd.attribute("ref"))!="" && model.getValue(ipt_suplplcecd.attribute("ref"))!=null )
  331. model.setValue(grd_setting.nodeset+"["+prow+"]/suplplcecd",model.getValue(ipt_suplplcecd.attribute("ref")));
  332. model.setValue(grd_setting.nodeset+"["+prow+"]/winseqno",fGetMaxWinSeqNo());
  333. model.setValue(grd_setting.nodeset+"["+prow+"]/delivedeptqty",0);
  334. model.setValue(grd_setting.nodeset+"["+prow+"]/deliveno",0);
  335. model.setValue(grd_setting.nodeset+"["+prow+"]/stocqty",0);
  336. model.setValue(grd_setting.nodeset+"["+prow+"]/iokind",model.getValue(ipt_iokind.attribute("ref")));
  337. model.setValue(grd_setting.nodeset+"["+prow+"]/paycond",model.getValue(rdo_paycond.attribute("ref")));;
  338. }
  339. function fGetMaxWinSeqNo()
  340. {
  341. var maxwinseqno = "";
  342. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows; currow++)
  343. {
  344. if(maxwinseqno < grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winseqno")))
  345. maxwinseqno = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winseqno"));
  346. }
  347. if(maxwinseqno.length == 0)maxwinseqno = "001";
  348. else maxwinseqno = parseFloat(maxwinseqno) + 1;
  349. maxwinseqno = "" + maxwinseqno;
  350. return maxwinseqno.getLeftPad(3,"0");
  351. }
  352. function fSettingGoodList(pnode, nodename, userqtynm){
  353. var codynode = instance1.selectNodes(pnode + "/*");
  354. var addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
  355. if(model.getValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
  356. for (var j = 1; j <= codynode.length ; j++) {
  357. if(addRow > grd_goodwin.rows - grd_goodwin.fixedRows)
  358. {
  359. misfGridIUD(grd_goodwin,"A");
  360. addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
  361. fDefaultSetting(addRow );
  362. }
  363. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd"));
  364. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm"));
  365. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec"));
  366. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel"));
  367. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm"));
  368. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/" + userqtynm));
  369. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
  370. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
  371. if(model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty") != "0" && model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty").length>0)
  372. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty"));
  373. else
  374. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" ,"1");
  375. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunitcost" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodunitcost"));
  376. addRow = addRow + 1;
  377. }
  378. model.recalculate();
  379. model.refresh();
  380. }
  381. function fSettingPreSaveData()
  382. {
  383. for(var liRow = grd_goodreq.fixedRows ; liRow < grd_goodreq.rows ; liRow++)
  384. {
  385. //출고생성되지 않은 데이타라면 출고시 입력을 위해 insert logic으로 구현한다
  386. if((grd_goodreq.valueMatrix(liRow ,"delivedd").length == 0 ||
  387. grd_goodreq.valueMatrix(liRow ,"deliveno").length == 0 ||
  388. grd_goodreq.valueMatrix(liRow ,"deliveseqno").length == 0) &&
  389. grd_goodreq.rowStatus(liRow) == "1")grd_goodreq.rowStatus(liRow) = "2";
  390. }
  391. }
  392. function fSettingSaveInData()
  393. {
  394. for(var liRow = grd_nonwin.fixedRows; liRow < grd_nonwin.rows ; liRow++)
  395. {
  396. if( grd_nonwin.rowStatus(liRow) == "2") {
  397. fDefaultSetting(liRow);
  398. // model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/windeptcd" , model.getValue(ipt_windeptcd.attribute("ref")));
  399. // model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/delivedeptcd" , model.getValue(ipt_windeptcd.attribute("ref")));
  400. }
  401. }
  402. }
  403. function fSettingSaveOutData()
  404. {
  405. for(var liRow = grd_goodreq.fixedRows ; liRow < grd_goodreq.rows ; liRow++)
  406. {
  407. //출고생성되지 않은 데이타라면 출고시 입력을 위해 insert logic으로 구현한다
  408. if((grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("delivedd")).length == 0 ||
  409. grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("deliveno")).length == 0 ||
  410. grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("deliveseqno")).length == 0) &&
  411. grd_goodreq.rowStatus(liRow) == "2")
  412. {
  413. grd_goodreq.rowStatus(liRow) = "1";
  414. model.setValue(grd_goodreq.nodeset + "[" + (liRow - grd_goodreq.fixedRows + 1) + "]/deliveunit" , grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("requnit")));
  415. model.setValue(grd_goodreq.nodeset + "[" + (liRow - grd_goodreq.fixedRows + 1) + "]/delivedeptcd" , model.getValue(ipt_windeptcd.attribute("ref")));
  416. }
  417. }
  418. model.setValue("/root/send/gooddelive/gooddelivelist", grd_goodreq.getUpdateData());
  419. submit("TXRSO00101");
  420. if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
  421. else
  422. {
  423. for(var liRow = grd_goodreq.fixedRows ; liRow < grd_goodreq.rows ; liRow++)
  424. {
  425. //출고생성되지 않은 데이타라면 출고시 입력을 위해 insert logic으로 구현한다
  426. if((grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("delivedd")).length == 0 ||
  427. grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("deliveno")).length == 0 ||
  428. grd_goodreq.valueMatrix(liRow , grd_goodreq.colRef("deliveseqno")).length == 0) &&
  429. grd_goodreq.rowStatus(liRow) == "1")grd_goodreq.rowStatus(liRow) = "2";
  430. }
  431. }
  432. }
  433. function fCheckSaveData()
  434. {
  435. if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
  436. {
  437. messageBox("기관코드를 " ,"C002");
  438. model.setFocus("cmb_instcd");
  439. return false;
  440. }
  441. if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
  442. {
  443. messageBox("물품구분을 " ,"C002");
  444. model.setFocus("cmb_goodflag");
  445. return false;
  446. }
  447. if(model.getValue(ipt_windd.attribute("ref")).length== 0 )
  448. {
  449. messageBox("입고일자를 " ,"C001");
  450. model.setFocus("ipt_windd");
  451. return false;
  452. }
  453. if(model.getValue(ipt_windeptcd.attribute("ref")).length== 0 )
  454. {
  455. messageBox("입고부서를 " ,"C001");
  456. model.setFocus("ipt_windeptcd");
  457. return false;
  458. }
  459. if(sch_select.selectedIndex == 0)
  460. {
  461. if(model.getValue(ipt_winpsn.attribute("ref")).length== 0 )
  462. {
  463. messageBox("입고담당자를 " ,"C001");
  464. model.setFocus("ipt_winpsn");
  465. return false;
  466. }
  467. if(model.getValue(rdo_paycond.attribute("ref")).length== 0 )
  468. {
  469. messageBox("계산방법을 " ,"C001");
  470. model.setFocus("rdo_paycond");
  471. return false;
  472. }
  473. if(model.getValue(cmb_calcdocukind.attribute("ref")).length== 0 )
  474. {
  475. messageBox("계산서유형을 " ,"C001");
  476. model.setFocus("cmb_calcdocukind");
  477. return false;
  478. }
  479. if(model.getValue(ipt_calcdocudd.attribute("ref")).length== 0 )
  480. {
  481. messageBox("계산서일자를 " ,"C001");
  482. model.setFocus("ipt_calcdocudd");
  483. return false;
  484. }
  485. for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
  486. {
  487. if((grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("select")) == "Y") &&
  488. (grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("winqty")).length == 0 ||grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("winqty")) == 0))
  489. {
  490. messageBox(currow + " 번째 입고량을 " ,"C001");
  491. grd_nonwin.endEditCell();
  492. grd_nonwin.row = currow;
  493. grd_nonwin.col= grd_nonwin.colRef("goodcd");
  494. grd_nonwin.editCell();
  495. return false;
  496. }
  497. }
  498. }
  499. else
  500. {
  501. // [2007.11.20 HBH ] 입고처리 저장시 공급처를 받아야하나?
  502. // if(model.getValue(ipt_suplplcecd.attribute("ref")).length== 0 )
  503. // {
  504. // messageBox("공급처를 " ,"C001");
  505. // model.setFocus("ipt_suplplcecd");
  506. // return false;
  507. // }
  508. var winqty = 0;
  509. var delivedeptqty = 0;
  510. var stocqty = 0;
  511. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  512. {
  513. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")).length == 0)
  514. {
  515. messageBox(currow + " 번째 물품코드를 " ,"C001");
  516. grd_goodwin.row = currow;
  517. grd_goodwin.col= grd_goodwin.colRef("goodcd");
  518. grd_goodwin.editCell();
  519. return false;
  520. }
  521. else
  522. {
  523. // for(srcrow = currow + 1 ; srcrow < grd_goodwin.rows ; srcrow++)
  524. // {
  525. // if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")) == grd_goodwin.valueMatrix(srcrow , grd_goodwin.colRef("goodcd")))
  526. // {
  527. // messageBox("동일 물품코드가 [" + (currow - grd_goodwin.fixedRows + 1)+ "," + (srcrow - grd_goodwin.fixedRows + 1)+ "->" + grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")) + "] 존재하여 저장 " ,"E001");
  528. // return false;
  529. // }
  530. // }
  531. }
  532. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")).length == 0)
  533. {
  534. messageBox((currow)+ " 번째 요구량을 " ,"C001");
  535. grd_goodwin.row = currow;
  536. grd_goodwin.col= grd_goodwin.colRef("winqty");
  537. grd_goodwin.editCell();
  538. return false;
  539. }
  540. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winunitcost")) == 0)
  541. {
  542. messageBox((currow)+ " 번째 단가를 " ,"C001");
  543. grd_goodwin.row = currow;
  544. grd_goodwin.col= grd_goodwin.colRef("winunitcost");
  545. grd_goodwin.editCell();
  546. return false;
  547. }
  548. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")) == 0)
  549. {
  550. messageBox((currow -1)+ " 번째 금액을 " ,"C001");
  551. grd_goodwin.row = currow;
  552. grd_goodwin.col= grd_goodwin.colRef("winamt");
  553. grd_goodwin.editCell();
  554. return false;
  555. }
  556. winqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty"));
  557. delivedeptqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("delivedeptqty"));
  558. stocqty = winqty - delivedeptqty;
  559. model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocqty" , stocqty);
  560. if(stocqty > 0)model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "Y");
  561. else model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "N");
  562. }
  563. }
  564. return true;
  565. }
  566. function fAfterRetrieve()
  567. {
  568. if(sch_select.selectedIndex == 0)
  569. {
  570. var nonwinqty = 0;
  571. var nonwinamt = 0;
  572. for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
  573. {
  574. nonwinamt = nonwinamt + 0 + parseFloat(grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("reqfla")));
  575. }
  576. model.setValue(opt_sumreqqty.attribute("ref"),grd_nonwin.rows - grd_nonwin.fixedRows);
  577. model.setValue(opt_sumreqfla.attribute("ref"),nonwinamt);
  578. /* 입고건수,금액 초기화 */
  579. model.setValue(opt_winqtycnt.attribute("ref"),"0");
  580. model.setValue(opt_winqtytotal.attribute("ref"),"0");
  581. }else{
  582. var winqty = 0;
  583. var winamt = 0;
  584. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  585. {
  586. winqty = winqty + parseFloat( grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")));
  587. winamt = winamt + 0 + parseFloat(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")));
  588. }
  589. model.setValue(ipt_sumwinqty.attribute("ref"),grd_goodwin.rows - grd_goodwin.fixedRows);
  590. model.setValue(opt_sumwinamt.attribute("ref"),winamt);
  591. }
  592. if(sch_select.selectedIndex == 0)
  593. {
  594. if(model.getValue("/root/main/list/goodnonwin/goodmaxwinno/winno").length > 0)
  595. model.setValue(ipt_winno.attribute("ref"),model.getValue("/root/main/list/goodnonwin/goodmaxwinno/winno"));
  596. }
  597. else
  598. {
  599. if(model.getValue("/root/main/list/goodwin/goodmaxwinno/winno").length > 0)
  600. model.setValue(ipt_winno.attribute("ref"),model.getValue("/root/main/list/goodwin/goodmaxwinno/winno"));
  601. }
  602. /* 왜 하는지 몰른다...막는다........2007.10.12 HBH*/
  603. //fArrangeControl("true");
  604. model.refresh();
  605. }
  606. function fArrangeControl(pDisabled)
  607. {
  608. cmb_instcd.disabled = pDisabled;
  609. cmb_goodflag.disabled =pDisabled;
  610. ipt_windeptcd.disabled =pDisabled;
  611. ipt_winpsn.disabled =pDisabled;
  612. if(pDisabled == "true")ipt_winno.attribute("editable") = "false";
  613. else
  614. {
  615. model.removeNodeset(grd_goodwin.nodeset);
  616. model.removeNodeset(grd_nonwin.nodeset);
  617. model.removeNodeset(grd_goodreq.nodeset);
  618. ipt_winno.attribute("editable") = "true";
  619. }
  620. model.setFocus("ipt_winno");
  621. model.refresh();
  622. }
  623. function fWinqtyTotal()
  624. {
  625. var amt = 0;
  626. var cnt = 0;
  627. grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("winqtytotal")) = parseFloat(grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("goodunitcost"))) * parseFloat(grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("winqty")));
  628. grd_nonwin.refresh();
  629. for(var r = grd_nonwin.fixedRows; r < grd_nonwin.rows; r++)
  630. {
  631. if( grd_nonwin.valueMatrix(r, grd_nonwin.colRef("select")) == 'Y' )
  632. {
  633. amt += parseFloat( grd_nonwin.valueMatrix(r, grd_nonwin.colRef("winqtytotal")) );
  634. cnt ++;
  635. }
  636. }
  637. opt_winqtytotal.value = amt;
  638. opt_winqtycnt.value = cnt;
  639. }
  640. ]]>
  641. </script>
  642. </xhtml:head>
  643. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  644. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  645. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">입고등록(성의교정)</caption>
  646. </group>
  647. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195px; height:744; ">
  648. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:87px; background-color:#fffbf2; border-color:#ffd799; "/>
  649. <caption id="caption1" class="tit_2" style="left:5px; top:106px; width:111px; height:13px; ">입고</caption>
  650. <input id="ipt_winno" ref="/root/send/goodwin/winno" class="input_default" disabled="false" editable="false" style="left:230px; top:70px; width:57px; height:19px; ">
  651. <script type="javascript" ev:event="onkeyup">
  652. <![CDATA[
  653. // inputEnterKey("btn_search", "DOMActivate");
  654. if(event.keyCode == 13)
  655. {
  656. model.setValue(ipt_winno.attribute("ref"),ipt_winno.currentText);
  657. model.refresh();
  658. if(fCheckRetrieveData(false) == false)return;
  659. if(sch_select.selectedIndex == 0)
  660. {
  661. misfGridInit(grd_nonwin);
  662. submit("TRRSI00102");
  663. }
  664. else
  665. {
  666. misfMsterDetailRetrieve();
  667. }
  668. fAfterRetrieve();
  669. }
  670. ]]>
  671. </script>
  672. </input>
  673. <button id="btn_windeptcd" class="icon_search" style="left:205px; top:45px; width:16px; height:16px; ">
  674. <caption/>
  675. <script type="javascript" ev:event="DOMActivate">
  676. <![CDATA[
  677. var recv_list = "windeptcd,windeptnm";
  678. misfOpenPopUpList("02", ipt_windeptcd,"", recv_list) ;
  679. model.refresh();
  680. if(sch_select.selectedIndex == 1)btn_search.dispatch("DOMActivate");
  681. ]]>
  682. </script>
  683. </button>
  684. <input id="ipt_windeptcd" ref="/root/send/goodwin/windeptcd" class="input_s_essential" maxlength="10" appearance="input" style="left:100px; top:44px; width:100px; height:19px; ">
  685. <script type="javascript" ev:event="xforms-value-changed">
  686. <![CDATA[
  687. if(ipt_windeptcd.value.length == 0)
  688. ipt_windeptnm.value = "";
  689. else
  690. rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptcd",
  691. "deptcd," + ipt_windeptcd.value, "", "windeptcd,windeptnm",
  692. ipt_windeptcd, "SPRPZ00200", "","");
  693. model.refresh();
  694. if(sch_select.selectedIndex == 1)btn_search.dispatch("DOMActivate");
  695. ]]>
  696. </script>
  697. </input>
  698. <input id="ipt_windeptnm" ref="/root/send/goodwin/windeptnm" class="input_fix" appearance="input" style="left:225px; top:45px; width:170px; height:19px; ">
  699. <script type="javascript" ev:event="xforms-value-changed">
  700. <![CDATA[
  701. if(ipt_windeptnm.value.length == 0)
  702. ipt_windeptcd.value = "";
  703. else
  704. rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptnm",
  705. "deptnm," + ipt_windeptnm.value, "", "windeptcd,windeptnm",
  706. ipt_windeptnm, "SPRPZ00200", "","");
  707. model.refresh();
  708. ]]>
  709. </script>
  710. </input>
  711. <button id="bnt_suplplcecd" class="icon_search" style="left:599px; top:47px; width:16px; height:16px; ">
  712. <caption/>
  713. <script type="javascript" ev:event="DOMActivate">
  714. <![CDATA[
  715. rszfOpenPopUpListByWndName(ipt_suplplcecd,"","suplplcecd,suplplcenm","SPRSD00220","instcd","cmb_instcd");
  716. model.refresh();
  717. btn_search.dispatch("DOMActivate");
  718. ]]>
  719. </script>
  720. </button>
  721. <input id="ipt_suplplcecd" ref="/root/send/goodwin/suplplcecd" class="input_essential" maxlength="10" style="left:505px; top:45px; width:90px; height:19px; ">
  722. <script type="javascript" ev:event="xforms-value-changed">
  723. <![CDATA[
  724. if(ipt_suplplcecd.value.length == 0)
  725. ipt_suplplcenm.value = "";
  726. else
  727. rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm",
  728. model.getValue(cmb_instcd.attribute("ref")) +",," + model.getValue(ipt_suplplcecd.attribute("ref")),"","suplplcecd,suplplcenm" ,
  729. ipt_suplplcecd,"SPRSD00220","instcd","cmb_instcd");
  730. model.refresh();
  731. btn_search.dispatch("DOMActivate");
  732. ]]>
  733. </script>
  734. </input>
  735. <input id="ipt_suplplcenm" ref="/root/send/goodwin/suplplcenm" class="input_fix" appearance="input" style="left:619px; top:45px; width:125px; height:19px; ">
  736. <script type="javascript" ev:event="xforms-value-changed">
  737. <![CDATA[
  738. if(ipt_suplplcenm.value.length == 0)
  739. ipt_suplplcecd.value = "";
  740. else
  741. rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm",
  742. model.getValue(cmb_instcd.attribute("ref")) +",," + model.getValue(ipt_suplplcenm.attribute("ref")),"","suplplcecd,suplplcenm" ,
  743. ipt_suplplcenm,"SPRSD00220","instcd","cmb_instcd");
  744. model.refresh();
  745. ]]>
  746. </script>
  747. </input>
  748. <textarea id="ipt_cmt" visibility="hidden" style="left:1035px; top:70px; width:55px; height:18px; ">
  749. <script type="javascript" ev:event="xforms-value-changed">
  750. <![CDATA[
  751. if(grd_goodwin.row > 0 &&( ipt_cmt.value != model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/cmt")))
  752. {
  753. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/cmt", ipt_cmt.value);
  754. if(grd_goodwin.rowStatus(grd_goodwin.row) == "0")grd_goodwin.rowStatus(grd_goodwin.row) = "2";
  755. model.refresh();
  756. }
  757. ]]>
  758. </script>
  759. </textarea>
  760. <select1 id="cmb_calcdocukind" ref="/root/send/goodwin/calcdocukind" class="combo_default" appearance="minimal" style="left:865px; top:45px; width:124px; height:19px; ">
  761. <choices>
  762. <itemset nodeset="/root/init/calcdocukind">
  763. <label ref="cdnm"/>
  764. <value ref="cdid"/>
  765. </itemset>
  766. </choices>
  767. <script type="javascript" ev:event="xforms-value-changed">
  768. <![CDATA[
  769. if(sch_select.selectedIndex == 1) btn_search.dispatch("DOMActivate");
  770. ]]>
  771. </script>
  772. </select1>
  773. <input id="ipt_calcdocudd" ref="/root/send/goodwin/calcdocudd" class="input_default" inputtype="date" style="left:865px; top:70px; width:124px; height:19px; ">
  774. <script type="javascript" ev:event="xforms-value-changed">
  775. <![CDATA[
  776. if(sch_select.selectedIndex == 1) btn_search.dispatch("DOMActivate");
  777. ]]>
  778. </script>
  779. </input>
  780. <select1 id="cmb_instcd" ref="/root/send/goodwin/instcd" class="combo_s_essential" appearance="minimal" style="left:100px; top:19px; width:125px; height:19px; ">
  781. <choices>
  782. <itemset nodeset="/root/init/instcd">
  783. <label ref="cdnm"/>
  784. <value ref="cdid"/>
  785. </itemset>
  786. </choices>
  787. <script type="javascript" ev:event="xforms-value-changed">
  788. <![CDATA[
  789. rszfComboBgcdBugtList("grd_nonwin.groupbugt", cmb_instcd.value, '1');
  790. rszfComboBgcdBugtList("grd_goodwin.groupbugt", cmb_instcd.value, '1');
  791. btn_search.dispatch("DOMActivate");
  792. ]]>
  793. </script>
  794. </select1>
  795. <select1 id="cmb_goodflag" ref="/root/send/goodwin/goodflag" class="combo_s_essential" appearance="minimal" style="left:505px; top:19px; width:183px; height:19px; ">
  796. <choices>
  797. <itemset nodeset="/root/init/goodflag">
  798. <label ref="cdnm"/>
  799. <value ref="cdid"/>
  800. </itemset>
  801. </choices>
  802. <script type="javascript" ev:event="xforms-value-changed">
  803. <![CDATA[
  804. btn_search.dispatch("DOMActivate");
  805. ]]>
  806. </script>
  807. </select1>
  808. <input id="ipt_windd" ref="/root/send/goodwin/windd" class="input_s_essential" inputtype="date" style="left:100px; top:70px; width:124px; height:19px; ">
  809. <script type="javascript" ev:event="xforms-value-changed">
  810. <![CDATA[
  811. // btn_search.dispatch("DOMActivate");
  812. ]]>
  813. </script>
  814. </input>
  815. <output id="opt_winpsnnm" ref="/root/send/goodwin/winpsnnm" class="output_fix" appearance="output" style="left:505px; top:70px; width:170px; height:19px; "/>
  816. <input id="ipt_winpsn" ref="/root/send/goodwin/winpsn" class="input_fix" visibility="hidden" maxlength="10" appearance="input" style="left:640px; top:70px; width:31px; height:19px; "/>
  817. <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1124px; top:40px; width:56px; height:22px; text-align:left; ">
  818. <caption>조회</caption>
  819. <script type="javascript" ev:event="DOMActivate">
  820. <![CDATA[
  821. if(fCheckRetrieveData(true) == false)return;
  822. model.setValue("/root/send/goodwin/retrmaxwinnoyn","Y");
  823. model.setValue("/root/send/goodwin/winno","");
  824. if(sch_select.selectedIndex == 0)
  825. {
  826. misfGridInit(grd_nonwin);
  827. submit("TRRSI00102");
  828. }
  829. else
  830. {
  831. // misfGridInit(grd_goodwin);
  832. // misfGridInit(grd_goodreq);
  833. misfMsterDetailRetrieve();
  834. }
  835. fAfterRetrieve();
  836. ]]>
  837. </script>
  838. </button>
  839. <switch id="sch_select" style="left:0px; top:149px; width:1195px; height:585px; ">
  840. <case id="cse_nonwin" selected="true" style="left:0px; top:0px; width:1195; height:585; ">
  841. <datagrid id="grd_nonwin" nodeset="/root/main/list/goodnonwin/goodnonwinlist" caption="선택^발주일자^순번^물품코드^품명^규격^모델^제조회사^발주량^단가^금액^기입고량^입고량^입고금액^진행상태^승인^미승인사유^계정^계정^프로젝트^예산편성액^예산추산액^예산집행액^예산잔액^연구과제" colsep="^" colwidth="32, 61, 38, 75, 181, 108, 72, 75, 54, 58, 60, 58, 56, 69, 63, 84, 30, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="23" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:29px; width:1193px; height:550px; ">
  842. <col checkvalue="Y,N" ref="select" type="checkbox"/>
  843. <col ref="purcdmnddd" format="yyyymmdd" style="text-align:center; "/>
  844. <col ref="purcdmndseq" style="text-align:center; "/>
  845. <col ref="goodcd"/>
  846. <col ref="goodnm"/>
  847. <col ref="goodspec"/>
  848. <col ref="goodmodel"/>
  849. <col ref="prodcmpynm"/>
  850. <col ref="reqqty" format="#,###" style="text-align:right; "/>
  851. <col ref="goodunitcost" format="#,###.##" style="text-align:right; "/>
  852. <col ref="reqfla" format="#,###.##" style="text-align:right; "/>
  853. <col ref="prewinqty" format="#,###" style="text-align:right; "/>
  854. <col ref="winqty" type="input" format="#,###" style="text-align:right; "/>
  855. <col ref="winqtytotal" format="#,###.##" style="text-align:right; "/>
  856. <col ref="prcsflagnm"/>
  857. <col ref="aprvnm" visibility="hidden" style="text-align:center; "/>
  858. <col ref="unaprvresn" visibility="hidden"/>
  859. <col ref="groupbugt" type="combo">
  860. <choices>
  861. <itemset>
  862. <label/>
  863. <value/>
  864. </itemset>
  865. </choices>
  866. </col>
  867. <col ref="acntnm" type="inputbutton"/>
  868. <col ref="projectnm"/>
  869. <col ref="totamt" format="#,###.##" style="text-align:right; "/>
  870. <col ref="bugtexpcamt" format="#,###.##" style="text-align:right; "/>
  871. <col ref="bugtexecamt" format="#,###.##" style="text-align:right; "/>
  872. <col ref="remainder" format="#,###.##" style="text-align:right; "/>
  873. <col ref="stdysubnm" type="inputbutton"/>
  874. <col ref="instcd" visibility="hidden"/>
  875. <col ref="goodflag" visibility="hidden"/>
  876. <col ref="windd" visibility="hidden"/>
  877. <col ref="winpsn" visibility="hidden"/>
  878. <col ref="windeptcd" visibility="hidden"/>
  879. <col ref="paycond" visibility="hidden"/>
  880. <col ref="temppay" visibility="hidden"/>
  881. <col ref="calcdocukind" visibility="hidden"/>
  882. <col ref="calcdocudd" visibility="hidden"/>
  883. <col ref="iokind" visibility="hidden"/>
  884. <col ref="delivedeptqty" visibility="hidden"/>
  885. <col ref="deliveno" visibility="hidden"/>
  886. <col ref="stocqty" visibility="hidden"/>
  887. <col ref="winseqno" visibility="hidden"/>
  888. <col ref="purcdmndno" visibility="hidden"/>
  889. <col ref="winpackqty" visibility="hidden"/>
  890. <col ref="winpackcntperunit" visibility="hidden"/>
  891. <col ref="winamt" visibility="hidden"/>
  892. <col ref="prewinqty" visibility="hidden"/>
  893. <col ref="requnit" visibility="hidden"/>
  894. <col ref="winpackunit" visibility="hidden"/>
  895. <col ref="reqflag" visibility="hidden"/>
  896. <col ref="reqdd" visibility="hidden"/>
  897. <col ref="reqno" visibility="hidden"/>
  898. <col ref="reqseqno" visibility="hidden"/>
  899. <col ref="delivedeptcd" visibility="hidden"/>
  900. <col ref="delivedd" visibility="hidden"/>
  901. <col ref="deliveno" visibility="hidden"/>
  902. <col ref="deliveseqno" visibility="hidden"/>
  903. <col ref="valiterm" visibility="hidden"/>
  904. <col ref="reqdeptcd" visibility="hidden"/>
  905. <col ref="reqpackcntperunit" visibility="hidden"/>
  906. <col ref="allsizespecid" visibility="hidden"/>
  907. <col ref="allsizespecidnm" visibility="hidden"/>
  908. <col ref="stdysubno" visibility="hidden"/>
  909. <col ref="ifgubn" visibility="hidden"/>
  910. <col ref="ifid" visibility="hidden"/>
  911. <col ref="subsuplplcecd" visibility="hidden"/>
  912. <col ref="suplplcecd" visibility="hidden"/>
  913. <col ref="projectid" visibility="hidden"/>
  914. <col ref="acntcd" visibility="hidden"/>
  915. <col ref="tranflag" visibility="hidden"/>
  916. <script type="javascript" ev:event="onclick">
  917. <![CDATA[
  918. if( grd_nonwin.rows - grd_nonwin.fixedRows > 0 && grd_nonwin.fixedRows <= grd_nonwin.row
  919. && ( ipt_suplplcecd.value.length <= 0 || ipt_suplplcenm.value.length <=0 ) ) {
  920. ipt_suplplcecd.value = grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("suplplcecd"));
  921. ipt_suplplcecd.refresh();
  922. ipt_suplplcecd.dispatch("xforms-value-changed");
  923. }
  924. ]]>
  925. </script>
  926. <script type="javascript" ev:event="onbuttonclick">
  927. <![CDATA[
  928. if (grd_nonwin.col == grd_nonwin.colRef("stdysubnm") ) {
  929. rszfOpenPopUpListByWndName(grd_nonwin,"","stdysubno,stdysubnm","SPRSD00260","instcd,reqdd", "cmb_instcd,purcdmnddd");
  930. }else if(grd_nonwin.col == grd_nonwin.colRef("acntnm"))
  931. {
  932. rszfOpenPopUpListByWndName(grd_nonwin,"","acntcd,acntnm,projectid,projectnm,totamt,bugtexpcamt,bugtexecamt,remainder,projectyn",
  933. "SPRSD00340","instcd,reqdd,deptcd,supacntcd4",
  934. "instcd,purcdmnddd,reqdeptcd,groupbugt","Y");
  935. }
  936. model.refresh();
  937. ]]>
  938. </script>
  939. <script type="javascript" ev:event="xforms-value-changed">
  940. <![CDATA[
  941. if(grd_nonwin.col == grd_nonwin.colRef("acntcd"))
  942. {
  943. grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("stdysubnm")) = '';
  944. grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("stdysubno")) = '';
  945. }else if (grd_nonwin.col == grd_nonwin.colRef("stdysubnm") )
  946. {
  947. var fprojectyn = fGetProjectynFocus(grd_nonwin);
  948. rszfValidationCheck("TRRSD00261", "studylist", "instcd,refcond,stdysubjnm,reqdd", cmb_instcd.value + ",stdysubjnm," + grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("stdysubnm")) + "," + grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("purcdmnddd"))
  949. ,"","stdysubno,stdysubnm" ,grd_nonwin,"SPRSD00260","instcd,reqdd","cmb_instcd,purcdmnddd");
  950. model.refresh();
  951. }
  952. else if(grd_nonwin.col == grd_nonwin.colRef("winqty"))
  953. {
  954. model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/select" , "Y");
  955. fWinqtyTotal();
  956. }
  957. else if(grd_nonwin.col == grd_nonwin.colRef("select") && grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("select")) == "N")
  958. {
  959. grd_nonwin.rowStatus(grd_nonwin.row) = "0";
  960. }
  961. if(grd_nonwin.col == grd_nonwin.colRef("select"))
  962. {
  963. if(grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("select")) == "N")
  964. {
  965. model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/winqty" , "0");
  966. grd_nonwin.rowStatus(grd_nonwin.row) = "0";
  967. }
  968. else
  969. {
  970. model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/winqty" , grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("reqqty"))-grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("prewinqty")));
  971. grd_nonwin.rowStatus(grd_nonwin.row) = "2";
  972. }
  973. fWinqtyTotal();
  974. }
  975. ]]>
  976. </script>
  977. <script type="javascript" ev:event="onaftersort">
  978. <![CDATA[
  979. grd_nonwin.gridToInstance();
  980. ]]>
  981. </script>
  982. </datagrid>
  983. <caption id="caption23" style="left:197px; top:5px; width:15px; height:20px; font-weight:bold; vertical-align:middle; ">~</caption>
  984. <input id="ipt_reqfrdd" ref="/root/send/goodwin/purcdmndfrdd" class="input_s_essential" inputtype="date" style="left:73px; top:3px; width:120; height:19px; ">
  985. <script type="javascript" ev:event="xforms-value-changed">
  986. <![CDATA[
  987. btn_search.dispatch("DOMActivate");
  988. ]]>
  989. </script>
  990. </input>
  991. <input id="ipt_reqtodd" ref="/root/send/goodwin/purcdmndtodd" class="input_s_essential" inputtype="date" style="left:213px; top:3px; width:120px; height:19px; ">
  992. <script type="javascript" ev:event="xforms-value-changed">
  993. <![CDATA[
  994. btn_search.dispatch("DOMActivate");
  995. ]]>
  996. </script>
  997. </input>
  998. <button id="btnselect" class="btn2_letter9" style="left:1075px; top:3px; width:119px; height:19px; ">
  999. <caption>전체/전체선택 취소</caption>
  1000. <script type="javascript" ev:event="DOMActivate">
  1001. <![CDATA[
  1002. for(var liRow = grd_nonwin.fixedRows; liRow < grd_nonwin.rows ; liRow++)
  1003. {
  1004. if(grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("select")) == "Y")
  1005. {
  1006. model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/select" , "N");
  1007. model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winqty" , "0");
  1008. // model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winqtytotal" , "0");
  1009. grd_nonwin.valueMatrix(liRow, grd_nonwin.colRef("winqtytotal")) = "0";
  1010. grd_nonwin.rowStatus(liRow) = "0";
  1011. }
  1012. else
  1013. {
  1014. model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/select" , "Y");
  1015. model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winqty" , grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("reqqty"))-grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("prewinqty")));
  1016. grd_nonwin.valueMatrix(liRow, grd_nonwin.colRef("winqtytotal")) = parseFloat(grd_nonwin.valueMatrix(liRow, grd_nonwin.colRef("goodunitcost"))) * parseFloat(grd_nonwin.valueMatrix(liRow, grd_nonwin.colRef("winqty")));
  1017. // model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winqtytotal" , grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("goodunitcost"))*grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("winqty")));
  1018. grd_nonwin.rowStatus(liRow) = "2";
  1019. }
  1020. }
  1021. fWinqtyTotal();
  1022. model.refresh();
  1023. ]]>
  1024. </script>
  1025. </button>
  1026. <line id="line2" class="line_1" style="x1:0px; y1:24px; x2:1193; y2:24px; "/>
  1027. <caption id="caption2" style="left:10px; top:3px; width:65px; height:23px; font-weight:bold; vertical-align:middle; ">발주일자 :</caption>
  1028. <output id="opt_sumreqqty" ref="/root/init/reqcnt" class="output_default" format="#,###" style="left:474px; top:3px; width:41px; height:19px; font-weight:bold; "/>
  1029. <caption id="caption4" style="left:521px; top:3px; width:72px; height:23px; vertical-align:middle; ">발주금액 :</caption>
  1030. <caption id="caption8" style="left:410px; top:3px; width:72px; height:23px; vertical-align:middle; ">발주건수 :</caption>
  1031. <output id="opt_sumreqfla" ref="/root/init/reqamt" class="output_default" format="#,###.##" style="left:584px; top:3px; width:75px; height:19px; font-weight:bold; "/>
  1032. <caption id="cap_winqtytotal" style="left:798px; top:2px; width:67px; height:23px; vertical-align:middle; ">입고금액 :</caption>
  1033. <output id="opt_winqtycnt" ref="/root/init/winqtycnt" class="output_default" format="#,###" style="left:728px; top:3px; width:56px; height:19px; font-weight:bold; text-align:right; "/>
  1034. <caption id="caption10" style="left:669px; top:2px; width:67px; height:23px; vertical-align:middle; ">입고건수 :</caption>
  1035. <output id="opt_winqtytotal" ref="/root/init/winqtytotal" class="output_default" format="#,###.##" style="left:857px; top:4px; width:85px; height:19px; font-weight:bold; text-align:right; "/>
  1036. <button id="btn_excel" class="btn5_letter3" style="left:1016px; top:3px; width:53px; height:19px; ">
  1037. <caption>엑셀</caption>
  1038. <script type="javascript" ev:event="DOMActivate">
  1039. <![CDATA[
  1040. var fileName = window.fileDialog("save", ",", false, "미입고조회", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  1041. if (fileName != "")
  1042. {
  1043. grd_nonwin.saveExcel(fileName, "미입고조회",true,true, "");
  1044. }
  1045. ]]>
  1046. </script>
  1047. </button>
  1048. </case>
  1049. <case id="cse_win" style="left:0px; top:0px; width:1195; height:585; ">
  1050. <datagrid id="grd_goodwin" nodeset="/root/main/list/goodwin/goodwinlist" caption="입고번호^입고순번^입고번호^물품코드*^품명^규격^모델^제조회사^포장수량^포장수량^포장수량^입고량^입고량^단가^입고금액^지불필^출고수량^잔량^계정^계정^프로젝트^예산편성액^예산추산액^예산집행액^예산잔액^계산서일자^연구과제^기관코드^물품구분^입고일자^입고자^입고부서^장소^계산구분^가납여부^전자계산방법^전자계산유무^입출력^부서^요구일자^요구번호^요구순번^출고번호^출고순번^보나에스코드^profno^계정코드^청구일자^청구번호^청구순번^valiterm^재고유무^체크일자^체크자^체크유무^슬립일자^슬립번호^공급처코드^비고^이전입고량" colsep="^" colwidth="120, 0, 0, 81, 163, 100, 80, 69, 36, 34, 40, 50, 27, 79, 90, 42, 55, 47, 120, 130, 103, 85, 85, 85, 85, 87, 89, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:29px; width:1193px; height:325px; ">
  1051. <col ref="winnum" style="text-align:center; "/>
  1052. <col ref="winno" visibility="hidden"/>
  1053. <col ref="winseqno" visibility="hidden"/>
  1054. <col ref="goodcd" _key="true"/>
  1055. <col ref="goodnm"/>
  1056. <col ref="goodspec"/>
  1057. <col ref="goodmodel"/>
  1058. <col ref="prodcmpynm"/>
  1059. <col ref="winpackqty" format="#,###" maxlength="9" style="text-align:right; "/>
  1060. <col ref="winpackunit" type="output"/>
  1061. <col ref="winpackcntperunit" format="#,###" maxlength="9" style="text-align:right; "/>
  1062. <col ref="winqty" format="#,###" maxlength="9" style="text-align:right; "/>
  1063. <col ref="winunit"/>
  1064. <col ref="winunitcost" format="#,###.##" maxlength="14" style="text-align:right; "/>
  1065. <col ref="winamt" format="#,###.##" maxlength="14" style="text-align:right; "/>
  1066. <col checkvalue="2,1" disabled="true" ref="paycond" type="checkbox"/>
  1067. <col ref="delivedeptqty" format="#,###" maxlength="14" style="text-align:right; "/>
  1068. <col ref="stocqty" format="#,###" maxlength="14" style="text-align:right; "/>
  1069. <col class="gridcombo" ref="groupbugt" type="combo">
  1070. <choices>
  1071. <itemset>
  1072. <label/>
  1073. <value/>
  1074. </itemset>
  1075. </choices>
  1076. </col>
  1077. <col ref="acntnm" type="inputbutton"/>
  1078. <col ref="projectnm"/>
  1079. <col ref="totamt" format="#,###.##" style="text-align:right; "/>
  1080. <col ref="bugtexpcamt" format="#,###.##" style="text-align:right; "/>
  1081. <col ref="bugtexecamt" format="#,###.##" style="text-align:right; "/>
  1082. <col ref="remainder" format="#,###.##" style="text-align:right; "/>
  1083. <col ref="calcdocudd" format="yyyy-mm-dd"/>
  1084. <col ref="stdysubnm"/>
  1085. <col ref="instcd" visibility="hidden"/>
  1086. <col ref="goodflag" visibility="hidden"/>
  1087. <col ref="windd" visibility="hidden"/>
  1088. <col ref="winpsn" visibility="hidden"/>
  1089. <col ref="windeptcd" visibility="hidden"/>
  1090. <col ref="installplcecd" visibility="hidden"/>
  1091. <col ref="temppay" visibility="hidden"/>
  1092. <col ref="calcdocukind" visibility="hidden"/>
  1093. <col ref="elctstmntyn" visibility="hidden"/>
  1094. <col ref="iokind" visibility="hidden"/>
  1095. <col ref="suplplcecd" visibility="hidden"/>
  1096. <col ref="purcdmnddd" visibility="hidden"/>
  1097. <col ref="purcdmndno" visibility="hidden"/>
  1098. <col ref="purcdmndseq" visibility="hidden"/>
  1099. <col ref="deliveno" visibility="hidden"/>
  1100. <col ref="deliveseqno" visibility="hidden"/>
  1101. <col ref="bnscd" visibility="hidden"/>
  1102. <col ref="profno" visibility="hidden"/>
  1103. <col ref="reqdd" visibility="hidden"/>
  1104. <col ref="reqno" visibility="hidden"/>
  1105. <col ref="reqseqno" visibility="hidden"/>
  1106. <col ref="valiterm" visibility="hidden"/>
  1107. <col ref="stocynindx" visibility="hidden"/>
  1108. <col ref="chkdd" visibility="hidden"/>
  1109. <col ref="chkpsn" visibility="hidden"/>
  1110. <col ref="chkyn" visibility="hidden"/>
  1111. <col ref="slipdd" visibility="hidden"/>
  1112. <col ref="slipno" visibility="hidden"/>
  1113. <col ref="suppcustcd" visibility="hidden"/>
  1114. <col ref="cmt" visibility="hidden"/>
  1115. <col ref="prewinqty" visibility="hidden"/>
  1116. <col ref="minexch" visibility="hidden"/>
  1117. <col ref="reqqty" visibility="hidden"/>
  1118. <col ref="allsizespecid" visibility="hidden"/>
  1119. <col ref="allsizespceidnm" visibility="hidden"/>
  1120. <col ref="stdysubno" visibility="hidden"/>
  1121. <col ref="acntcd" visibility="hidden"/>
  1122. <col ref="projectid" visibility="hidden"/>
  1123. <col ref="reqdeptcd" visibility="hidden"/>
  1124. <script type="javascript" ev:event="onbuttonclick">
  1125. <![CDATA[
  1126. if (grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.rowStatus(grd_goodwin.row) == "1" )
  1127. {//구성물품코드를 눌렀을 경우
  1128. model.removenode("/root/copynode");
  1129. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  1130. model.makeNode("/root/copynode");
  1131. rszfOpenPopUpListByWndName(grd_goodwin,"","goodcd,goodnm","SPRSD00190","instcd,goodflag","cmb_instcd,cmb_goodflag");
  1132. var cur_row = grd_goodwin.row;
  1133. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  1134. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  1135. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  1136. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  1137. }
  1138. else if (grd_goodreq.col == grd_goodreq.colRef("stdysubnm") )
  1139. {
  1140. rszfOpenPopUpListByWndName(grd_goodwin,"","stdysubno,stdysubnm","SPRSD00260","instcd","cmb_instcd");
  1141. }else if(grd_goodreq.col == grd_goodreq.colRef("acntnm") )
  1142. {
  1143. rszfOpenPopUpListByWndName(grd_nonwin,"","acntcd,acntnm,projectid,projectnm,totamt,bugtexpcamt,bugtexecamt,remainder,projectyn",
  1144. "SPRSD00340","instcd,reqdd,deptcd,supacntcd4",
  1145. "instcd,purcdmnddd,reqdeptcd,groupbugt","Y");
  1146. }
  1147. model.refresh();
  1148. ]]>
  1149. </script>
  1150. <script type="javascript" ev:event="onrowchanged">
  1151. <![CDATA[
  1152. ipt_cmt.value = model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/cmt");
  1153. //misfGridInit(grd_goodreq);
  1154. if(grd_goodwin.rowStatus(grd_goodwin.row) != "1" && model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/purcdmnddd").length > 0)
  1155. {
  1156. misfMsterDetailRetrieve();
  1157. }
  1158. else misfGridInit(grd_goodreq);
  1159. ]]>
  1160. </script>
  1161. <script type="javascript" ev:event="xforms-value-changed">
  1162. <![CDATA[
  1163. if(grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("goodcd")).length> 0) {
  1164. model.removenode("/root/copynode");
  1165. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  1166. model.makeNode("/root/copynode");
  1167. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," +model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag") + "," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodcd") + ",,,," ,"","goodcd,goodnm,goodspec,goodmodel,prodcmpynm,exchqty,goodunitcost",grd_goodwin,"SPRSD00190","instcd,goodflag","cmb_instcd," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag"),"Y");
  1168. model.refresh();
  1169. if( grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length> 0)
  1170. {
  1171. if(model.getValue("/root/init/main/goodlist/exchqty") > 0) model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit",model.getValue("/root/init/main/goodlist/exchqty") );
  1172. else model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit","1");
  1173. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" ,model.getValue("/root/init/main/goodlist/purcunit"));
  1174. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , model.getValue("/root/init/main/goodlist/purcunit"));
  1175. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" ,1);
  1176. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , model.getValue("/root/init/main/goodlist/goodunitcost"));
  1177. }
  1178. model.recalculate();
  1179. model.refresh();
  1180. var cur_row = grd_goodwin.row;
  1181. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  1182. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  1183. if(CSV.length == 0 && grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length == 0)
  1184. {
  1185. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodcd" , "");
  1186. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodnm" , "");
  1187. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodspec" , "");
  1188. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodmodel" , "");
  1189. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/prodcmpynm" , "");
  1190. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" , "");
  1191. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" , "");
  1192. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , "");
  1193. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , "");
  1194. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackcntperunit" , "");
  1195. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , "");
  1196. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winamt" , "");
  1197. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  1198. grd_goodwin.editCell();
  1199. }
  1200. if(CSV.length > 0)
  1201. {
  1202. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodcd","");
  1203. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  1204. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  1205. }
  1206. }
  1207. ]]>
  1208. </script>
  1209. <script type="javascript" ev:event="onkeydown">
  1210. <![CDATA[
  1211. if(event.keyCode == 9)
  1212. {
  1213. if(event.shiftKey)
  1214. {
  1215. if(grd_goodwin.colAttribute(grd_goodwin.col + 1, "type").indexOf ("input") > -1)
  1216. {
  1217. for(curcol = grd_goodwin.col -1 ; curcol > -1 ; curcol--)
  1218. {
  1219. if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  1220. {
  1221. grd_goodwin.col = curcol;
  1222. grd_goodwin.editCell();
  1223. return;
  1224. }
  1225. }
  1226. }
  1227. }
  1228. else
  1229. {
  1230. if(grd_goodwin.colAttribute(grd_goodwin.col, "type").indexOf ("input") == -1)
  1231. {
  1232. if(grd_goodwin.col - 1 == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.col - 1).length == 0)
  1233. {
  1234. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  1235. grd_goodwin.editCell();
  1236. return;
  1237. }
  1238. for(curcol = grd_goodwin.col ; curcol <grd_goodwin.cols ; curcol++)
  1239. {
  1240. if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  1241. {
  1242. grd_goodwin.col = curcol;
  1243. grd_goodwin.editCell();
  1244. return;
  1245. }
  1246. }
  1247. }
  1248. }
  1249. }
  1250. ]]>
  1251. </script>
  1252. <script type="javascript" ev:event="onaftersort">
  1253. <![CDATA[
  1254. grd_goodwin.gridToInstance();
  1255. ]]>
  1256. </script>
  1257. </datagrid>
  1258. <caption id="caption3" class="tit_2" style="left:5px; top:6px; width:118px; height:13px; ">입고내역</caption>
  1259. <line id="line1" class="line_1" style="x1:0px; y1:383px; x2:1193px; y2:383px; "/>
  1260. <button id="btn_choidel" class="btn2_letter3" style="left:1141px; top:3px; width:53px; height:19px; ">
  1261. <caption>행삭제</caption>
  1262. <script type="javascript" ev:event="DOMActivate">
  1263. <![CDATA[
  1264. misfGridIUD(grd_goodwin, "D");
  1265. ]]>
  1266. </script>
  1267. </button>
  1268. <output id="ipt_sumwinqty" ref="/root/init/winqty" class="output_default" style="left:698px; top:5px; width:71px; height:19px; font-weight:bold; "/>
  1269. <output id="opt_sumwinamt" ref="/root/init/winamt" class="output_default" format="#,###.##" style="left:859px; top:5px; width:171px; height:19px; font-weight:bold; "/>
  1270. <button id="btn_insert" class="btn2_letter3" visibility="hidden" style="left:1086px; top:3px; width:53px; height:19px; ">
  1271. <caption>행추가</caption>
  1272. <script type="javascript" ev:event="DOMActivate">
  1273. <![CDATA[
  1274. if(fCheckRetrieveData(true) == false)return;
  1275. misfGridIUD(grd_goodwin, "A");
  1276. grd_goodwin.row = grd_goodwin.rows -grd_goodwin.fixedRows ;
  1277. ipt_cmt.value = "";
  1278. fDefaultSetting(grd_goodwin.row );
  1279. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  1280. grd_goodwin.editCell();
  1281. ]]>
  1282. </script>
  1283. </button>
  1284. <caption id="caption5" style="left:641px; top:5px; width:60px; height:23px; vertical-align:middle; ">입고건수 :</caption>
  1285. <caption id="caption7" style="left:802px; top:5px; width:60px; height:23px; vertical-align:middle; ">입고합계 :</caption>
  1286. <button id="btn_delive" class="btn2_letter2" style="left:1152px; top:362px; width:42px; height:19px; ">
  1287. <caption>출고</caption>
  1288. <script type="javascript" ev:event="DOMActivate">
  1289. <![CDATA[
  1290. fSettingSaveOutData();
  1291. ]]>
  1292. </script>
  1293. </button>
  1294. <button id="btn_subdelive" class="btn2_letter4" style="left:1086px; top:362px; width:64px; height:19px; ">
  1295. <caption>부분출고</caption>
  1296. <script type="javascript" ev:event="DOMActivate">
  1297. <![CDATA[
  1298. var winqty = parseFloat(grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("winqty")));
  1299. if(winqty < 0)return;
  1300. var reqqty = 0;
  1301. var setwinqty = 0;
  1302. for(var currow = grd_goodreq.fixedRows ; currow < grd_goodreq.rows ; currow++)
  1303. {
  1304. reqqty = parseFloat(grd_goodreq.valueMatrix(currow , grd_goodreq.colRef("realadjtqty")));
  1305. setwinqty = winqty;
  1306. winqty = winqty - reqqty;
  1307. if(winqty > 0)
  1308. {
  1309. model.setValue(grd_goodreq.nodeset + "[" + (currow - grd_goodreq.fixedRows + 1) + "]/delivedeptqty" , reqqty);
  1310. grd_goodreq.rowStatus(currow) = "2";
  1311. }
  1312. if(winqty < 0)
  1313. {
  1314. model.setValue(grd_goodreq.nodeset + "[" + (currow - grd_goodreq.fixedRows + 1) + "]/delivedeptqty" , setwinqty);
  1315. grd_goodreq.rowStatus(currow) = "2";
  1316. break;
  1317. }
  1318. }
  1319. fSettingSaveOutData();
  1320. ]]>
  1321. </script>
  1322. </button>
  1323. <line id="line4" class="line_1" style="x1:0px; y1:24; x2:1193px; y2:24; "/>
  1324. <input id="ipt_wintodd" ref="/root/send/goodwin/wintodd" class="input_s_essential" inputtype="date" style="left:278px; top:3px; width:112px; height:19px; text-align:center; ">
  1325. <script type="javascript" ev:event="xforms-value-changed">
  1326. <![CDATA[
  1327. btn_search.dispatch("DOMActivate");
  1328. ]]>
  1329. </script>
  1330. </input>
  1331. <input id="ipt_winfrdd" ref="/root/send/goodwin/winfrdd" class="input_s_essential" inputtype="date" style="left:145px; top:3px; width:112px; height:19px; text-align:center; ">
  1332. <script type="javascript" ev:event="xforms-value-changed">
  1333. <![CDATA[
  1334. btn_search.dispatch("DOMActivate");
  1335. ]]>
  1336. </script>
  1337. </input>
  1338. <caption id="caption11" style="left:87px; top:6px; width:60px; height:18px; vertical-align:middle; ">입고일자 :</caption>
  1339. <caption id="caption12" style="left:260px; top:7px; width:15px; height:20px; font-weight:bold; vertical-align:middle; ">~</caption>
  1340. <datagrid id="grd_goodreq" nodeset="/root/main/list/gooddmndreq/gooddmndreqlist" caption="청구부서^청구일자^청구번호^청구순번^청구^청구^발주량^기출고량^출고량^잔량^청구자^원내번호^휴대번호^비고" colsep="^" colwidth="153, 101, 66, 68, 59, 38, 90, 93, 97, 103, 65, 70, 3, 146, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:388px; width:1193px; height:191px; ">
  1341. <col ref="reqdeptnm"/>
  1342. <col ref="reqdd" format="yyyy-mm-dd"/>
  1343. <col ref="reqno" style="text-align:center; "/>
  1344. <col ref="reqseqno" style="text-align:center; "/>
  1345. <col ref="reqqty" format="#,###" style="text-align:right; "/>
  1346. <col ref="requnit"/>
  1347. <col ref="realadjtqty" format="#,###" style="text-align:right; "/>
  1348. <col ref="deliveqty" format="#,###" style="text-align:right; "/>
  1349. <col ref="delivedeptqty" type="input" format="#,###" style="text-align:right; "/>
  1350. <col ref="stocqty" format="#,###" style="text-align:right; "/>
  1351. <col ref="reqpsnnm" style="text-align:center; "/>
  1352. <col ref="hosinseqno" style="text-align:center; "/>
  1353. <col ref="mpphonno" visibility="hidden"/>
  1354. <col ref="cmt"/>
  1355. <col ref="delivedeptcd" visibility="hidden"/>
  1356. <col ref="predeliveqty" visibility="hidden"/>
  1357. <col ref="deliveno" visibility="hidden"/>
  1358. <col ref="delivedd" visibility="hidden"/>
  1359. <col ref="deliveseqno" visibility="hidden"/>
  1360. <col ref="iokindcd" visibility="hidden"/>
  1361. <col ref="deliveunit" visibility="hidden"/>
  1362. <col ref="instcd" visibility="hidden"/>
  1363. <col ref="goodflag" visibility="hidden"/>
  1364. <col ref="goodcd" visibility="hidden"/>
  1365. <col ref="deliveseqno" visibility="hidden"/>
  1366. <col ref="windeptcd" visibility="hidden"/>
  1367. <col ref="reqflag" visibility="hidden"/>
  1368. <col ref="reqno" visibility="hidden"/>
  1369. <col ref="windd" visibility="hidden"/>
  1370. <col ref="winno" visibility="hidden"/>
  1371. <col ref="winseqno" visibility="hidden"/>
  1372. <col ref="deliveunit" visibility="hidden"/>
  1373. <col ref="delivedeptqty" visibility="hidden"/>
  1374. <col ref="predelivedeptqty" visibility="hidden"/>
  1375. <col ref="reqdeptcd" visibility="hidden"/>
  1376. <col ref="adjtqty" visibility="hidden"/>
  1377. <col ref="workflag" visibility="hidden"/>
  1378. <script type="javascript" ev:event="onaftersort">
  1379. <![CDATA[
  1380. grd_goodreq.gridToInstance();
  1381. ]]>
  1382. </script>
  1383. </datagrid>
  1384. </case>
  1385. </switch>
  1386. <button id="button2" class="btn_sw" group="tab" style="left:124px; top:129px; width:144px; height:22px; ">
  1387. <caption>입고관리</caption>
  1388. <toggle case="cse_win" ev:event="DOMActivate"/>
  1389. </button>
  1390. <button id="button6" class="btn_sw" group="tab" selected="true" style="left:0px; top:129px; width:125px; height:22px; ">
  1391. <caption>미입고조회/입고</caption>
  1392. <toggle case="cse_nonwin" ev:event="DOMActivate"/>
  1393. </button>
  1394. <input id="ipt_addtax" ref="/root/send/goodwin/addtax" class="input_fix" visibility="hidden" maxlength="10" appearance="input" style="left:1035px; top:20px; width:15px; height:19px; "/>
  1395. <input id="ipt_iokind" ref="/root/send/goodwin/iokind" visibility="hidden" style="left:991px; top:45px; width:35px; height:19px; "/>
  1396. <line id="line7" class="line_4" style="x1:1109px; y1:20px; x2:1109px; y2:83px; border-color:#ffe4bb; border-left-style:solid; "/>
  1397. <caption id="caption13" class="search_name" style="left:15px; top:19px; width:86px; height:17px; ">기관코드 :</caption>
  1398. <caption id="caption15" class="search_name" style="left:15px; top:71px; width:86px; height:17px; ">입고일자 :</caption>
  1399. <caption id="caption18" class="search_name" style="left:417px; top:45px; width:86px; height:17px; ">공 급 처 :</caption>
  1400. <caption id="caption19" class="search_name" style="left:417px; top:19px; width:86px; height:17px; ">물품구분 :</caption>
  1401. <caption id="caption20" class="search_name" style="left:15px; top:45px; width:86px; height:17px; ">입고부서 :</caption>
  1402. <caption id="caption21" class="search_name" style="left:767px; top:45px; width:99px; height:17px; ">계산서유형 :</caption>
  1403. <caption id="caption22" class="search_name" style="left:767px; top:71px; width:99px; height:17px; ">계산서일자 :</caption>
  1404. <line id="line3" class="line_1" style="x1:0px; y1:120px; x2:1195px; y2:120px; "/>
  1405. <output id="opt_interfacegubn" ref="/root/send/goodwin/interfacegubn" visibility="hidden" style="left:1055px; top:20px; width:20px; height:19px; "/>
  1406. <caption id="caption9" class="search_name" style="left:767px; top:19px; width:101px; height:17px; ">계 산 방 법 :</caption>
  1407. <select1 id="rdo_paycond" ref="/root/send/goodwin/paycond" appearance="full" cellspacing="10" cols="2" overflow="visible" style="left:867px; top:19px; width:160px; height:20px; border-style:none; ">
  1408. <choices>
  1409. <itemset nodeset="/root/init/paycond">
  1410. <label ref="label"/>
  1411. <value ref="value"/>
  1412. </itemset>
  1413. </choices>
  1414. <script type="javascript" ev:event="xforms-value-changed">
  1415. <![CDATA[
  1416. btn_search.dispatch("DOMActivate");
  1417. ]]>
  1418. </script>
  1419. </select1>
  1420. <button id="btn_trans" class="btn2_letter12" visibility="hidden" style="left:1035px; top:125px; width:152px; height:19px; ">
  1421. <caption>평화드림 미입고 가져오기</caption>
  1422. <script type="javascript" ev:event="DOMActivate">
  1423. <![CDATA[
  1424. /******************************************************
  1425. ** 20081110 평화드림으로 부터 입고 Interface 받는 부분 없음
  1426. ** 해당 항목 주석처리
  1427. ******************************************************/
  1428. /*
  1429. if(fCheckRetrieveData(true) == false)return;
  1430. fDataLoadNoWin();
  1431. */
  1432. ]]>
  1433. </script>
  1434. </button>
  1435. <output id="output1" ref="/root/send/goodwin/winpsnnm" class="output_fix" appearance="output" style="left:505px; top:70px; width:170px; height:19px; "/>
  1436. <input id="input1" ref="/root/send/goodwin/winpsn" class="input_fix" visibility="hidden" maxlength="10" appearance="input" style="left:640px; top:70px; width:31px; height:19px; "/>
  1437. <caption id="caption14" class="search_name" style="left:15px; top:71px; width:86px; height:17px; ">입고일자 :</caption>
  1438. <caption id="caption16" class="search_name" style="left:417px; top:71px; width:86px; height:17px; ">입고담당 :</caption>
  1439. <select id="checkbox1" ref="/root/send/goodwin/winpsnyn" overflow="visible" appearance="full" style="left:680px; top:71px; width:20px; height:15px; border-style:none; ">
  1440. <choices>
  1441. <item>
  1442. <label/>
  1443. <value>Y</value>
  1444. </item>
  1445. </choices>
  1446. </select>
  1447. </group>
  1448. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  1449. <button id="button1" class="btn3_letter6" visibility="hidden" style="left:57px; top:3px; width:104px; height:22px; ">
  1450. <caption>입고전표관리</caption>
  1451. </button>
  1452. <button id="button3" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  1453. <caption>출력</caption>
  1454. </button>
  1455. <button id="btn_init" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  1456. <caption>초기화</caption>
  1457. <script type="javascript" ev:event="DOMActivate">
  1458. <![CDATA[
  1459. fInitialize();
  1460. ]]>
  1461. </script>
  1462. </button>
  1463. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  1464. <button id="btn_save" class="btn4_letter2" style="left:1070px; top:3px; width:56px; height:22px; ">
  1465. <caption>저장</caption>
  1466. <script type="javascript" ev:event="DOMActivate">
  1467. <![CDATA[
  1468. if(fCheckSaveData() == false)return;
  1469. if(sch_select.selectedIndex == 0)
  1470. {
  1471. if ( getGridUpdateData(grd_nonwin).length <= 0 ) return;
  1472. fSettingSaveInData();
  1473. model.setValue("/root/send/savenonwin/interfacecustcdlist/purc_main_suplplcecd",rszfGetMainCust(purc_main_suplplcecd));
  1474. model.setValue("/root/send/savenonwin/interfacecustcdlist/purc_main_suplplcecd2",rszfGetMainCust(purc_main_suplplcecd2));
  1475. model.setValue("/root/send/savenonwin/interfacecustcdlist/purc_main_suplplcecd3",rszfGetMainCust(purc_main_suplplcecd3));
  1476. model.setValue("/root/send/savenonwin/interfacecustcdlist/drg_main_suplplcecd",rszfGetMainCust(drg_main_suplplcecd));
  1477. model.setValue("/root/send/savenonwin/goodnonwinlist", grd_nonwin.getUpdateData());
  1478. submit("TXRSI00102");
  1479. }
  1480. else
  1481. {
  1482. model.setValue("/root/send/save/interfacecustcdlist/purc_main_suplplcecd",rszfGetMainCust(purc_main_suplplcecd));
  1483. model.setValue("/root/send/save/interfacecustcdlist/purc_main_suplplcecd2",rszfGetMainCust(purc_main_suplplcecd2));
  1484. model.setValue("/root/send/save/interfacecustcdlist/purc_main_suplplcecd3",rszfGetMainCust(purc_main_suplplcecd3));
  1485. model.setValue("/root/send/save/interfacecustcdlist/drg_main_suplplcecd" ,rszfGetMainCust(drg_main_suplplcecd ));
  1486. misfSave("TXRSI00101");
  1487. }
  1488. if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
  1489. ]]>
  1490. </script>
  1491. </button>
  1492. </group>
  1493. </xhtml:body>
  1494. </xhtml:html>