SMRSI10000_약국입고관리(경북대).xrw 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <wincompare>
  23. <windetail>
  24. <goodcd/>
  25. <winunit/>
  26. <winunitcost/>
  27. <winpackqty/>
  28. <winamt/>
  29. <bnscd/>
  30. <edicd/>
  31. </windetail>
  32. <biwindetail>
  33. <bi_goodcd/>
  34. <bi_winunit/>
  35. <bi_winunitcost/>
  36. <bi_winpackqty/>
  37. <bi_winamt/>
  38. <bi_bnscd/>
  39. <bi_edicd/>
  40. </biwindetail>
  41. </wincompare>
  42. </list>
  43. <item/>
  44. </main>
  45. <send>
  46. <save>
  47. <goodwinlist/>
  48. <goodnonwinlist/>
  49. <interfacecustcdlist>
  50. <purc_main_suplplcecd/>
  51. <drg_main_suplplcecd/>
  52. </interfacecustcdlist>
  53. </save>
  54. <goodwin>
  55. <instcd/>
  56. <goodflag/>
  57. <windd/>
  58. <winno/>
  59. <windeptcd/>
  60. <windeptnm/>
  61. <winpsn/>
  62. <winpsnnm/>
  63. <paycond/>
  64. <suplplcecd/>
  65. <suplplcenm/>
  66. <calcdocukind/>
  67. <calcdocudd/>
  68. <purcdmndfrdd/>
  69. <purcdmndtodd/>
  70. <addtax/>
  71. <retrmaxwinnoyn/>
  72. <iokind/>
  73. <interfacegubn/>
  74. <bideliveno/>
  75. </goodwin>
  76. <gooddmndreq>
  77. <instcd/>
  78. <goodflag/>
  79. <purcdmnddd/>
  80. <purcdmndno/>
  81. <purcdmndseq/>
  82. </gooddmndreq>
  83. <savenonwin>
  84. <goodnonwinlist/>
  85. <interfacecustcdlist>
  86. <purc_main_suplplcecd/>
  87. <drg_main_suplplcecd/>
  88. </interfacecustcdlist>
  89. </savenonwin>
  90. <gooddelive>
  91. <gooddelivelist/>
  92. </gooddelive>
  93. <nonautowinyn/>
  94. </send>
  95. <init>
  96. <winqty/>
  97. <winamt/>
  98. <reqcnt/>
  99. <reqamt/>
  100. <winqtytotal>0</winqtytotal>
  101. <winqtycnt>0</winqtycnt>
  102. </init>
  103. <hidden/>
  104. <temp/>
  105. <copynode/>
  106. </root>
  107. </instance>
  108. <script type="javascript" ev:event="xforms-ready">
  109. <![CDATA[
  110. fInitialize();
  111. ]]>
  112. </script>
  113. <submission id="TRRSI00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodwin"/>
  114. <submission id="TRRSI00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodnonwin"/>
  115. <submission id="TRRSI00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodnonwin"/>
  116. <submission id="TRRSD00403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/gooddmndreq" resultref="/root/main/list/gooddmndreq"/>
  117. <submission id="TXRSI00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/hidden/temp">"</submission>
  118. <submission id="TXRSO00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/gooddelive" resultref="/root/hidden/temp">"</submission>
  119. <submission id="TXRSI00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savenonwin" resultref="/root/hidden/temp">"</submission>
  120. </model>
  121. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  122. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  123. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  124. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  125. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  126. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  127. <script type="javascript">
  128. <![CDATA[
  129. function fInitialize() {
  130. misfGridInit(grd_goodwin);
  131. misfGridInit(grd_nonwin);
  132. var curdate = getCurrentDate();
  133. var cvtdate = curdate.toDate("YYYYMMDD");
  134. model.setValue(ipt_windd.attribute("ref") ,curdate);
  135. var bfdd = ((getCurrentDate()).toDate()).getAddDate(-1, "M");
  136. model.setValue(ipt_reqfrdd.attribute("ref") ,bfdd.getDateFormat());
  137. model.setValue(ipt_reqtodd.attribute("ref") ,curdate);
  138. model.setValue(ipt_sumwinqty.attribute("ref"),0);
  139. model.setValue(opt_sumwinamt.attribute("ref"),0);
  140. rszfComboStockArthDeptcdList(cmb_windeptcd,getUserInfo("dutplceinstcd"),"PH" );
  141. model.setValue("/root/send/goodwin/windeptcd",getUserInfo("dutplcecd"))
  142. model.setValue(ipt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  143. grd_nonwin.selectionmode = "free";
  144. grd_goodwin.selectionmode = "free";
  145. for(licol = 0; licol < grd_nonwin.cols ; licol++){
  146. if(grd_nonwin.colRef("reqdeptnm") != licol){
  147. grd_nonwin.mergecol(licol) = false;
  148. }
  149. }
  150. for(licol = 0; licol < grd_goodwin.cols ; licol++){
  151. if(grd_goodwin.colRef("windeptnm") != licol){
  152. grd_goodwin.mergecol(licol) = false;
  153. }
  154. }
  155. grd_nonwin.mergecells = "bycol";
  156. grd_goodwin.mergecells = "bycol";
  157. model.refresh();
  158. }
  159. function fSetGridColor( currow ) {
  160. if ( grd_nonwin.valueMatrix(currow, grd_nonwin.colRef("comparevalue")) != "0" )
  161. grd_nonwin.cellstyle("background-color", currow, grd_nonwin.colRef("select"), currow, grd_nonwin.colRef("unaprvresn") ) = "yellow";
  162. else
  163. grd_nonwin.cellstyle("background-color", currow, grd_nonwin.colRef("select"), currow, grd_nonwin.colRef("unaprvresn") ) = "white";
  164. }
  165. function fCheckRetrieveData(pmsg)
  166. {
  167. if(model.getValue(ipt_instcd.attribute("ref")).length== 0 )
  168. {
  169. if(pmsg == true)
  170. {
  171. messageBox("기관코드를 " ,"C002");
  172. model.setFocus("ipt_instcd");
  173. }
  174. return false;
  175. }
  176. if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
  177. {
  178. if(pmsg == true)
  179. {
  180. messageBox("물품구분을 " ,"C002");
  181. model.setFocus("cmb_goodflag");
  182. }
  183. return false;
  184. }
  185. /*
  186. if(model.getValue(ipt_suplplcecd.attribute("ref")).length== 0 )
  187. {
  188. if(pmsg == true)
  189. {
  190. messageBox("공급처를 " ,"C001");
  191. model.setFocus("ipt_suplplcecd");
  192. }
  193. return false;
  194. }*/
  195. if(model.getValue(cmb_windeptcd.attribute("ref")).length== 0 )
  196. {
  197. if(pmsg == true)
  198. {
  199. messageBox("입고부서를 " ,"C001");
  200. model.setFocus("cmb_windeptcd");
  201. }
  202. return false;
  203. }
  204. if(sch_select.selectedIndex == 0)
  205. {
  206. if(model.getValue(ipt_reqfrdd.attribute("ref")).length== 0 )
  207. {
  208. if(pmsg == true)
  209. {
  210. messageBox("발주시작일자 " ,"C001");
  211. model.setFocus("ipt_reqfrdd");
  212. }
  213. return false;
  214. }
  215. if(model.getValue(ipt_reqtodd.attribute("ref")).length== 0 )
  216. {
  217. if(pmsg == true)
  218. {
  219. messageBox("발주종료일자 " ,"C001");
  220. model.setFocus("ipt_reqtodd");
  221. }
  222. return false;
  223. }
  224. return true;
  225. }
  226. else
  227. {
  228. if(model.getValue(ipt_windd.attribute("ref")).length== 0 )
  229. {
  230. if(pmsg == true)
  231. {
  232. messageBox("입고일자를 " ,"C001");
  233. model.setFocus("ipt_windd");
  234. }
  235. return false;
  236. }
  237. }
  238. return true;
  239. }
  240. function fDefaultSetting(prow)
  241. {
  242. var grd_setting;
  243. if(sch_select.selectedIndex == 0)grd_setting = grd_nonwin;
  244. else grd_setting = grd_goodwin;
  245. model.setValue(grd_setting.nodeset+"["+prow+"]/instcd",model.getValue(ipt_instcd.attribute("ref")));
  246. model.setValue(grd_setting.nodeset+"["+prow+"]/goodflag" ,"PH");
  247. model.setValue(grd_setting.nodeset+"["+prow+"]/windd" ,model.getValue(ipt_windd.attribute("ref")));
  248. model.setValue(grd_setting.nodeset+"["+prow+"]/winpsn" ,model.getValue(ipt_winpsn.attribute("ref")));
  249. model.setValue(grd_setting.nodeset+"["+prow+"]/windeptcd" ,model.getValue(grd_setting.nodeset+"["+prow+"]/reqdeptcd"));
  250. model.setValue(grd_setting.nodeset+"["+prow+"]/paycond" ,"1");
  251. model.setValue(grd_setting.nodeset+"["+prow+"]/calcdocukind",model.getValue(opt_calcdocukind.attribute("ref")));;
  252. model.setValue(grd_setting.nodeset+"["+prow+"]/winseqno" ,fGetMaxWinSeqNo());
  253. }
  254. function fGetMaxWinSeqNo()
  255. {
  256. var maxwinseqno = "";
  257. for(var currow = grd_goodwin.rows -1 ; currow > 0;currow--){
  258. if(currow == 1){
  259. maxwinseqno = 0;
  260. }else{
  261. maxwinseqno = parseFloat(grd_goodwin.valueMatrix(currow-1 , grd_goodwin.colRef("winseqno")));
  262. }
  263. maxwinseqno = maxwinseqno + 1;
  264. break;
  265. }
  266. maxwinseqno = "" + maxwinseqno;
  267. return maxwinseqno.getLeftPad(3,"0");
  268. }
  269. function fSettingGoodList(pnode, nodename, userqtynm){
  270. var codynode = instance1.selectNodes(pnode + "/*");
  271. var addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
  272. if(model.getValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
  273. for (var j = 1; j <= codynode.length ; j++) {
  274. if(addRow > grd_goodwin.rows - grd_goodwin.fixedRows)
  275. {
  276. misfGridIUD(grd_goodwin,"A");
  277. addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
  278. fDefaultSetting(addRow );
  279. }
  280. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd"));
  281. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm"));
  282. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec"));
  283. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel"));
  284. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm"));
  285. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/" + userqtynm));
  286. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
  287. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
  288. if(model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty") != "0" && model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty").length>0)
  289. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty"));
  290. else
  291. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" ,"1");
  292. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunitcost" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodunitcost"));
  293. addRow = addRow + 1;
  294. }
  295. model.recalculate();
  296. model.refresh();
  297. }
  298. function fSettingSaveInData()
  299. {
  300. for(var liRow = grd_nonwin.fixedRows; liRow < grd_nonwin.rows ; liRow++)
  301. {
  302. fDefaultSetting(liRow);
  303. //model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/windeptcd" , model.getValue(cmb_windeptcd.attribute("ref")));
  304. model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/delivedeptcd" , model.getValue(cmb_windeptcd.attribute("ref")));
  305. }
  306. }
  307. function fGridCheck()
  308. {
  309. var vReturn = -1;
  310. for(var liRow = grd_nonwin.fixedRows; liRow < grd_nonwin.rows ; liRow++)
  311. {
  312. if ( grd_nonwin.valueMatrix( liRow, grd_nonwin.colRef("comparevalue") ) != "0" )
  313. return vReturn = liRow;
  314. }
  315. return vReturn;
  316. }
  317. function fCheckSaveData()
  318. {
  319. if(sch_select.selectedIndex == 0)
  320. {
  321. for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
  322. {
  323. if((grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("select")) == "Y") &&
  324. (grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("winqty")).length == 0 ||grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("winqty")) == 0))
  325. {
  326. messageBox(currow + " 번째 입고량을 " ,"C001");
  327. grd_nonwin.endEditCell();
  328. grd_nonwin.row = currow;
  329. grd_nonwin.col= grd_nonwin.colRef("goodcd");
  330. grd_nonwin.editCell();
  331. return false;
  332. }
  333. }
  334. }
  335. else
  336. {
  337. if(model.getValue(ipt_suplplcecd.attribute("ref")).length== 0 )
  338. {
  339. messageBox("공급처를 " ,"C001");
  340. model.setFocus("ipt_suplplcecd");
  341. return false;
  342. }
  343. var winqty = 0;
  344. var delivedeptqty = 0;
  345. var stocqty = 0;
  346. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  347. {
  348. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")).length == 0)
  349. {
  350. messageBox(currow + " 번째 물품코드를 " ,"C001");
  351. grd_goodwin.row = currow;
  352. grd_goodwin.col= grd_goodwin.colRef("goodcd");
  353. grd_goodwin.editCell();
  354. return false;
  355. }
  356. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")).length == 0)
  357. {
  358. messageBox((currow)+ " 번째 요구량을 " ,"C001");
  359. grd_goodwin.row = currow;
  360. grd_goodwin.col= grd_goodwin.colRef("winqty");
  361. grd_goodwin.editCell();
  362. return false;
  363. }
  364. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winunitcost")) == 0)
  365. {
  366. messageBox((currow)+ " 번째 단가를 " ,"C001");
  367. grd_goodwin.row = currow;
  368. grd_goodwin.col= grd_goodwin.colRef("winunitcost");
  369. grd_goodwin.editCell();
  370. return false;
  371. }
  372. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")) == 0)
  373. {
  374. messageBox((currow -1)+ " 번째 금액을 " ,"C001");
  375. grd_goodwin.row = currow;
  376. grd_goodwin.col= grd_goodwin.colRef("winamt");
  377. grd_goodwin.editCell();
  378. return false;
  379. }
  380. winqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty"));
  381. delivedeptqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("delivedeptqty"));
  382. stocqty = winqty - delivedeptqty;
  383. model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocqty" , stocqty);
  384. if(stocqty > 0)model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "Y");
  385. else model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "N");
  386. }
  387. }
  388. return true;
  389. }
  390. function fAfterRetrieve()
  391. {
  392. if(sch_select.selectedIndex == 0)
  393. {
  394. var nonwinqty = 0;
  395. var nonwinamt = 0;
  396. for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
  397. {
  398. nonwinamt = nonwinamt + 0 + parseFloat(grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("reqfla")));
  399. }
  400. model.setValue(opt_sumreqqty.attribute("ref"),grd_nonwin.rows - grd_nonwin.fixedRows);
  401. model.setValue(opt_sumreqfla.attribute("ref"),nonwinamt);
  402. /* 입고건수,금액 초기화 */
  403. model.setValue(opt_winqtycnt.attribute("ref"),"0");
  404. model.setValue(opt_winqtytotal.attribute("ref"),"0");
  405. }else{
  406. var winqty = 0;
  407. var winamt = 0;
  408. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  409. {
  410. winqty = winqty + parseFloat( grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")));
  411. winamt = winamt + 0 + parseFloat(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")));
  412. }
  413. model.setValue(ipt_sumwinqty.attribute("ref"),grd_goodwin.rows - grd_goodwin.fixedRows);
  414. model.setValue(opt_sumwinamt.attribute("ref"),winamt);
  415. }
  416. if(sch_select.selectedIndex == 0)
  417. {
  418. if(model.getValue("/root/main/list/goodnonwin/goodmaxwinno/winno").length > 0)
  419. model.setValue(ipt_winno.attribute("ref"),model.getValue("/root/main/list/goodnonwin/goodmaxwinno/winno"));
  420. }
  421. else
  422. {
  423. if(model.getValue("/root/main/list/goodwin/goodmaxwinno/winno").length > 0)
  424. model.setValue(ipt_winno.attribute("ref"),model.getValue("/root/main/list/goodwin/goodmaxwinno/winno"));
  425. }
  426. /* [2007.12.10 HBH] : 왜 하는지를 몰라 막음.*/
  427. //fArrangeControl("true");
  428. model.refresh();
  429. }
  430. function fArrangeControl(pDisabled)
  431. {
  432. ipt_instcd.disabled = pDisabled;
  433. cmb_goodflag.disabled =pDisabled;
  434. cmb_windeptcd.disabled =pDisabled;
  435. ipt_winpsn.disabled =pDisabled;
  436. if(pDisabled == "true")ipt_winno.attribute("editable") = "false";
  437. else
  438. {
  439. model.removeNodeset(grd_goodwin.nodeset);
  440. model.removeNodeset(grd_nonwin.nodeset);
  441. // model.removeNodeset(grd_goodreq.nodeset);
  442. ipt_winno.attribute("editable") = "true";
  443. }
  444. model.setFocus("ipt_winno");
  445. model.refresh();
  446. }
  447. /**
  448. * @ver :
  449. * @desc : 총입고건수 및 총입고 금액 셋팅
  450. * @param :
  451. * @return :
  452. * @---------------------------------------------------
  453. */
  454. function fWinqtyTotal(flag)
  455. {
  456. var amt = 0;
  457. var cnt = 0;
  458. if(flag==0){
  459. for(var r = grd_nonwin.fixedRows; r < grd_nonwin.rows; r++)
  460. {
  461. if( grd_nonwin.valueMatrix(r, grd_nonwin.colRef("select")) == 'Y' )
  462. {
  463. amt += parseInt( grd_nonwin.valueMatrix(r, grd_nonwin.colRef("winamt")) );
  464. cnt ++;
  465. }
  466. }
  467. opt_winqtytotal.value = amt;
  468. opt_winqtycnt.value = cnt;
  469. }else{
  470. for(var r = grd_goodwin.fixedRows; r < grd_goodwin.rows; r++)
  471. {
  472. amt += parseInt( grd_goodwin.valueMatrix(r, grd_goodwin.colRef("winamt")) );
  473. cnt ++;
  474. }
  475. ipt_sumwinqty.value = cnt;
  476. opt_sumwinamt.value = amt;
  477. }
  478. }
  479. /**
  480. * @ver :
  481. * @desc : 입고수량 및 입고금액 계산 셋팅
  482. * @param :
  483. * @return :
  484. * @---------------------------------------------------
  485. */
  486. function fCalcWinamt(flag,prow)
  487. {
  488. if(flag==0){
  489. var pWinPackQty = parseInt(grd_nonwin.valueMatrix(prow, grd_nonwin.colRef("winpackqty"))) ;
  490. var pGoodPurcCost = parseInt(grd_nonwin.valueMatrix(prow, grd_nonwin.colRef("goodunitcost"))) ;
  491. var ReqPackCntPerUnit = grd_nonwin.valueMatrix(prow, grd_nonwin.colRef("reqpackcntperunit"));
  492. var pWinAmt = parseInt(pWinPackQty * pGoodPurcCost);
  493. var pWinQty = parseInt(pWinPackQty * ReqPackCntPerUnit);
  494. model.setValue(grd_nonwin.nodeset + "[" + prow + "]/winamt" , pWinAmt);
  495. model.setValue(grd_nonwin.nodeset + "[" + prow + "]/winqty" , pWinQty);
  496. grd_nonwin.refresh();
  497. }else{
  498. var pWinPackQty = parseInt(grd_goodwin.valueMatrix(prow, grd_goodwin.colRef("winpackqty"))) ;
  499. var pWinunitcost = parseInt(grd_goodwin.valueMatrix(prow, grd_goodwin.colRef("winunitcost"))) ;
  500. var pWinpackcntperunit = grd_goodwin.valueMatrix(prow, grd_goodwin.colRef("winpackcntperunit"));
  501. var pWinAmt = parseInt(pWinPackQty * pWinunitcost);
  502. var pWinQty = parseInt(pWinPackQty * pWinpackcntperunit);
  503. model.setValue(grd_goodwin.nodeset + "[" + prow + "]/winamt" , pWinAmt);
  504. model.setValue(grd_goodwin.nodeset + "[" + prow + "]/winqty" , pWinQty);
  505. grd_goodwin.refresh();
  506. }
  507. }
  508. function fCompareDataSetting( ) {
  509. model.setValue( opt_goodcd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("goodcd" ) ) );
  510. model.setValue( opt_winunit.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("winunit" ) ) );
  511. model.setValue( opt_winunitcost.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("winunitcost") ) );
  512. model.setValue( opt_winpackqty.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("winpackqty") ) );
  513. model.setValue( ipt_winamt.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("winamt" ) ) );
  514. model.setValue( opt_bnscd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("bnscd" ) ) );
  515. model.setValue( opt_edicd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("edicd" ) ) );
  516. model.setValue( opt_bigoodcd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("bigoodcd" ) ) );
  517. model.setValue( opt_biwinunit.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biwinunit" ) ) );
  518. model.setValue( opt_biwinunitcost.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biwinunitcost") ) );
  519. model.setValue( opt_biwinpackqty.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biwinpackqty") ) );
  520. model.setValue( opt_biwinamt.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biwinamt" ) ) );
  521. model.setValue( opt_bibnscd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("bibnscd" ) ) );
  522. model.setValue( opt_biedicd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biedicd" ) ) );
  523. fOldNewCompare("/root/main/list/wincompare/biwindetail", "/root/main/list/wincompare/windetail" )
  524. swt_map.refresh();
  525. }
  526. /*
  527. * old & new 결과값을 비교 한다.
  528. * pDefault : "Y" 일 경우 componets 초기화 ( 폰트 색상을 초기화 한다. )
  529. */
  530. function fOldNewCompare(pOriData_node, pNewData_node, pDefault) {
  531. // var child = window.document.body.group3.swt_select.cse_costlist.grp_disp.swt_map.children; // switch 안에 포함된 Case 묶음을 가지고 있는 객체
  532. var node1 = instance1.selectNodes(pOriData_node + "/*"); // Ori Master Data
  533. var node2 = instance1.selectNodes(pNewData_node + "/*"); // New Master Data
  534. var nodeName;
  535. var tempControl;
  536. if ( pDefault == "Y" ) {
  537. //. Grid Componets 초기화
  538. fComponetInit();
  539. return;
  540. }
  541. for (var i = 0; i < node1.length ; i++) {
  542. nodeName = node1.item(i).nodeName.split("_"); // -> old_good 이런 형태의 노드이기때문에 new 코드와 mapping 하기 위해서 "_" split 처리함
  543. // nodeName[1] 으로 비교 처리
  544. for (var j = 0; j < node2.length; j++) {
  545. if (nodeName[1] == node2.item(j).nodeName) {
  546. if (node1.item(i).value != node2.item(j).value ){
  547. fComponetSearch( pNewData_node + "/" + node2.item(j).nodeName,"Y");
  548. } else {
  549. fComponetSearch( pNewData_node + "/" + node2.item(j).nodeName);
  550. }
  551. break;
  552. }
  553. }
  554. }
  555. }
  556. /* ========================================
  557. * 신구 데이터 비교를 후 색상 변화를 처리하는 함수
  558. */
  559. function fComponetSearch(pNode, pCls) {
  560. var child = window.document.body.grp_biz.sch_select.cse_nonwin.swt_map.cse_basic.children;
  561. for (ii = 0; ii < child.length; ii++) {
  562. if( child.item(ii).attribute("ref").length <= 0 ) continue;
  563. if( child.item(ii).attribute("ref") == pNode) {
  564. if (pCls == "Y") {
  565. if (child.item(ii).elementName == "xforms:input" || child.item(ii).elementName == "xforms:ouput") {
  566. child.item(ii).attribute("color") = "red";
  567. }else {
  568. child.item(ii).attribute("background-color") = "#ccffcc";
  569. }
  570. return;
  571. } else {
  572. if (child.item(ii).elementName == "xforms:input" || child.item(ii).elementName == "xforms:ouput") {
  573. child.item(ii).initStyle("color");
  574. }else {
  575. child.item(ii).initStyle("background-color");
  576. }
  577. }
  578. continue;
  579. }
  580. } // end for
  581. }
  582. /*
  583. * 콤포넌트 초기화
  584. */
  585. function fComponetInit() {
  586. var child = window.document.body.grp_biz.sch_select.cse_nonwin.swt_map.cse_basic.children;
  587. var ii = 0;
  588. for (ii = 0; ii < child.length; ii++) {
  589. child2 = child.item(ii).children ;
  590. for (jj = 0; jj < child2.length; jj++) {
  591. if (child2.item(jj).elementName == "xforms:input" ) {
  592. child2.item(jj).initStyle("color");
  593. } else {
  594. child2.item(jj).initStyle("background-color");
  595. }
  596. }
  597. }
  598. }
  599. function fSetPosition ( pview ) {
  600. swt_map.visible = pview;
  601. if(pview == true) {
  602. grd_nonwin.attribute("width") = String(1193 - parseInt( swt_map.attribute("width") ) ) ; //848 //
  603. } else
  604. {
  605. grd_nonwin.attribute("width") = "1193";
  606. }
  607. // swt_map" class="sw_box" visibility="hidden"
  608. grd_nonwin.refresh();
  609. }
  610. function fGridSetting ( pGubun ) {
  611. /*if (ipt_suplplcecd.value == rszfGetMainCust(drg_main_suplplcecd)
  612. && model.getValue(chk_nonautowinyn.attribute("ref")) !='Y' )
  613. {
  614. grd_nonwin.colHidden( grd_nonwin.colRef("goodunitcost") ) = true;
  615. grd_nonwin.colHidden( grd_nonwin.colRef("winqty") ) = true;
  616. grd_nonwin.colHidden( grd_nonwin.colRef("winunitcost") ) = false;
  617. grd_nonwin.colHidden( grd_nonwin.colRef("winpackqty") ) = false;
  618. } else {
  619. grd_nonwin.colHidden( grd_nonwin.colRef("goodunitcost") ) = false;
  620. grd_nonwin.colHidden( grd_nonwin.colRef("winqty") ) = false;
  621. grd_nonwin.colHidden( grd_nonwin.colRef("winunitcost") ) = true;
  622. grd_nonwin.colHidden( grd_nonwin.colRef("winpackqty") ) = true;
  623. }*/
  624. grd_nonwin.colHidden( grd_nonwin.colRef("goodunitcost") ) = false;
  625. //grd_nonwin.colHidden( grd_nonwin.colRef("winqty") ) = false;
  626. grd_nonwin.colHidden( grd_nonwin.colRef("winunitcost") ) = true;
  627. //grd_nonwin.colHidden( grd_nonwin.colRef("winpackqty") ) = true;
  628. grd_nonwin.refresh();
  629. }
  630. ]]>
  631. </script>
  632. </xhtml:head>
  633. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  634. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  635. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">약품 입고관리</caption>
  636. </group>
  637. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195; height:744; ">
  638. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195; height:61px; background-color:#fffbf2; border-color:#ffd799; "/>
  639. <!-- <input id="ipt_winno" ref="/root/send/goodwin/winno" class="input_default" editable="false" style="left:207px; top:18px; width:57px; height:19px; ">-->
  640. <input id="ipt_winno" ref="/root/send/goodwin/winno" class="input_default" visibility="hidden" style="left:640px; top:25px; width:57px; height:19px; ">
  641. <script type="javascript" ev:event="onkeyup">
  642. <![CDATA[
  643. if(event.keyCode == 13)
  644. {
  645. model.setValue(ipt_winno.attribute("ref"),ipt_winno.currentText);
  646. model.refresh();
  647. if(fCheckRetrieveData(false) == false)return;
  648. if(sch_select.selectedIndex == 0)
  649. {
  650. misfGridInit(grd_nonwin);
  651. submit("TRRSI00102");
  652. }
  653. else
  654. {
  655. misfMsterDetailRetrieve();
  656. }
  657. //fAfterRetrieve();
  658. }
  659. ]]>
  660. </script>
  661. </input>
  662. <input id="ipt_windd" ref="/root/send/goodwin/windd" class="input_s_essential" inputtype="date" style="left:105px; top:28px; width:105px; height:19px; "/>
  663. <input id="ipt_winpsn" ref="/root/send/goodwin/winpsn" class="input_fix" visibility="hidden" maxlength="10" appearance="input" style="left:1040px; top:15px; width:25px; height:19px; "/>
  664. <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1124px; top:30px; width:56px; height:22px; text-align:left; ">
  665. <caption>조회</caption>
  666. <script type="javascript" ev:event="DOMActivate">
  667. <![CDATA[
  668. model.setValue("/root/send/goodwin/goodflag","PH");
  669. if(sch_select.selectedIndex == 0){
  670. if(submit("TRRSI00102")){
  671. fAfterRetrieve();
  672. fGridSetting(); //-- 수작업 입고에 따른 조건 추가 [20090408]YYJ
  673. for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
  674. {
  675. grd_nonwin.cellstyle("background-color", currow, grd_nonwin.colRef("winpackqty"), currow, grd_nonwin.colRef("winpackqty") ) = "yellow";
  676. }
  677. grd_nonwin.col = grd_nonwin.colRef("winpackqty");
  678. model.setFocus("grd_nonwin");
  679. grd_nonwin.editCell();
  680. }
  681. }else{
  682. if(submit("TRRSI00101")){
  683. var winqty = 0;
  684. var winamt = 0;
  685. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  686. {
  687. grd_goodwin.cellstyle("background-color", currow, grd_goodwin.colRef("winpackqty"), currow, grd_goodwin.colRef("winpackqty") ) = "yellow";
  688. winqty = winqty + parseFloat( grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")));
  689. winamt = winamt + parseFloat(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")));
  690. }
  691. model.setValue(ipt_sumwinqty.attribute("ref"),grd_goodwin.rows-1);
  692. model.setValue(opt_sumwinamt.attribute("ref"),winamt);
  693. ipt_sumwinqty.refresh();
  694. opt_sumwinamt.refresh();
  695. }
  696. }
  697. ]]>
  698. </script>
  699. </button>
  700. <switch id="sch_select" style="left:0px; top:105px; width:1195px; height:638px; ">
  701. <case id="cse_nonwin" selected="true" style="left:0px; top:0px; width:1193px; height:638; ">
  702. <datagrid id="grd_nonwin" nodeset="/root/main/list/goodnonwin/goodnonwinlist" class="datagrid2" caption="선택^입고유형^구매일자^요구부서^구매년월^차수^약품코드^약품명^함량^모델^제조회사^발주수량^발주수량^포장^포장^포장^단가^단가^금액^기입고량^기입고량^입고수량^입고수량^입고금액^진행상태^승인^미승인사유" colsep="^" colwidth="30, 6, 5, 76, 64, 37, 88, 243, 65, 0, 0, 45, 45, 38, 36, 31, 69, 69, 81, 56, 55, 67, 67, 89, 59, 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, 100, 100, 100" dataheight="23" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:30px; width:1193px; height:598px; ">
  703. <col checkvalue="Y,N" ref="select" type="checkbox"/>
  704. <col ref="iokindnm" visibility="hidden" style="text-align:left; "/>
  705. <col ref="purcdmnddd" visibility="hidden" format="yyyy-mm-dd"/>
  706. <col ref="reqdeptnm" style="text-align:center; "/>
  707. <col ref="purcdmndmm" format="yyyy-mm" style="text-align:center; "/>
  708. <col ref="purcdmndno" style="text-align:center; "/>
  709. <col ref="goodcd"/>
  710. <col ref="goodnm"/>
  711. <col ref="goodspec"/>
  712. <col ref="goodmodel" visibility="hidden"/>
  713. <col ref="prodcmpynm" visibility="hidden"/>
  714. <col ref="reqpackcnt" format="#,###" style="text-align:right; "/>
  715. <col ref="reqqty" format="#,###" style="text-align:right; "/>
  716. <col ref="reqpackcntperunit"/>
  717. <col ref="requnit"/>
  718. <col ref="reqpackunit"/>
  719. <col ref="winunitcost" format="#,###.##" style="text-align:right; "/>
  720. <col ref="goodunitcost" visibility="hidden" format="#,###" style="text-align:right; "/>
  721. <!--// -->
  722. <col ref="reqfla" format="#,###" style="text-align:right; "/>
  723. <col ref="prewinpackqty" format="#,###" style="left:1096px; top:23px; width:65px; height:23px; text-align:right; "/>
  724. <col ref="prewinqty" visibility="hidden" format="#,###" style="left:1096px; top:23px; width:65px; height:23px; text-align:right; "/>
  725. <col ref="winpackqty" type="input" format="#,###.##" style="text-align:right; "/>
  726. <col ref="winqty" type="output" visibility="hidden" format="#,###" style="text-align:right; "/>
  727. <!--// -->
  728. <col ref="winamt" format="#,###.#" style="text-align:right; "/>
  729. <col ref="prcsflagnm" visibility="hidden"/>
  730. <col ref="aprvnm" visibility="hidden" style="text-align:center; "/>
  731. <col ref="unaprvresn" visibility="hidden"/>
  732. <col ref="instcd" visibility="hidden"/>
  733. <col ref="goodflag" visibility="hidden"/>
  734. <col ref="windd" visibility="hidden"/>
  735. <col ref="winpsn" visibility="hidden"/>
  736. <col ref="windeptcd" visibility="hidden"/>
  737. <col ref="suplplcecd" visibility="hidden"/>
  738. <col ref="paycond" visibility="hidden"/>
  739. <col ref="temppay" visibility="hidden"/>
  740. <col ref="calcdocukind" visibility="hidden"/>
  741. <col ref="calcdocudd" visibility="hidden"/>
  742. <col ref="iokind" visibility="hidden"/>
  743. <col ref="delivedeptqty" visibility="hidden"/>
  744. <col ref="deliveno" visibility="hidden"/>
  745. <col ref="stocqty" visibility="hidden"/>
  746. <col ref="winseqno" visibility="hidden"/>
  747. <col ref="purcdmndseq" visibility="hidden"/>
  748. <col ref="winpackcntperunit" visibility="hidden"/>
  749. <col ref="prewinqty" visibility="hidden"/>
  750. <col ref="winpackunit" visibility="hidden"/>
  751. <col ref="reqflag" visibility="hidden"/>
  752. <col ref="reqdd" visibility="hidden"/>
  753. <col ref="reqno" visibility="hidden"/>
  754. <col ref="reqseqno" visibility="hidden"/>
  755. <col ref="delivedeptcd" visibility="hidden"/>
  756. <col ref="delivedd" visibility="hidden"/>
  757. <col ref="deliveno" visibility="hidden"/>
  758. <col ref="deliveseqno" visibility="hidden"/>
  759. <col ref="valiterm" visibility="hidden"/>
  760. <col ref="reqdeptcd" visibility="hidden"/>
  761. <col ref="prewinqty" visibility="hidden"/>
  762. <col ref="allsizespecid" visibility="hidden"/>
  763. <col ref="allsizespecidnm" visibility="hidden"/>
  764. <col ref="stdysubno" visibility="hidden"/>
  765. <col ref="ifgubn" visibility="hidden"/>
  766. <col ref="ifid" visibility="hidden"/>
  767. <col ref="suplplcecd" visibility="hidden"/>
  768. <col ref="winqty" visibility="hidden"/>
  769. <col ref="goodunitcost" visibility="hidden"/>
  770. <col ref="goodpurccost" visibility="hidden"/>
  771. <col ref="bnscd" visibility="hidden"/>
  772. <col ref="winunit" visibility="hidden"/>
  773. <col ref="bnswinstatus" visibility="hidden"/>
  774. <col ref="edicd" visibility="hidden"/>
  775. <col ref="bigoodcd" visibility="hidden"/>
  776. <col ref="biwinunit" visibility="hidden"/>
  777. <col ref="biwinunitcost" visibility="hidden"/>
  778. <col ref="biwinpackqty" visibility="hidden"/>
  779. <col ref="biwinamt" visibility="hidden"/>
  780. <col ref="bibnscd" visibility="hidden"/>
  781. <col ref="biedicd" visibility="hidden"/>
  782. <col ref="comparevalue" visibility="hidden"/>
  783. <script type="javascript" ev:event="xforms-value-changed">
  784. <![CDATA[
  785. if(grd_nonwin.col == grd_nonwin.colRef("winpackqty"))
  786. {
  787. model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/select" , "Y");
  788. fCalcWinamt(sch_select.selectedIndex,grd_nonwin.row - grd_nonwin.fixedRows + 1);
  789. fWinqtyTotal(sch_select.selectedIndex);
  790. }
  791. else if(grd_nonwin.col == grd_nonwin.colRef("select"))
  792. {
  793. if(grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("select")) == "N")
  794. {
  795. model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/winqty" , 0);
  796. model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/winpackqty" , 0);
  797. grd_nonwin.rowStatus(grd_nonwin.row) = "0";
  798. }
  799. else
  800. {
  801. 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")) ));
  802. model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/winpackqty" ,grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("reqpackcnt")));
  803. grd_nonwin.rowStatus(grd_nonwin.row) = "2";
  804. }
  805. fCalcWinamt(sch_select.selectedIndex,grd_nonwin.row - grd_nonwin.fixedRows + 1);
  806. fWinqtyTotal(sch_select.selectedIndex);
  807. }
  808. ]]>
  809. </script>
  810. <script type="javascript" ev:event="onaftersort">
  811. <![CDATA[
  812. grd_nonwin.gridToInstance();
  813. ]]>
  814. </script>
  815. <script type="javascript" ev:event="onendedit">
  816. <![CDATA[
  817. if(grd_nonwin.col == grd_nonwin.colRef("winpackqty")){
  818. if(grd_nonwin.row < grd_nonwin.rows - grd_nonwin.fixedRows){
  819. grd_nonwin.row = grd_nonwin.row + 1;
  820. grd_nonwin.select(grd_nonwin.row, grd_nonwin.colRef("winpackqty")) = true;
  821. }
  822. }
  823. ]]>
  824. </script>
  825. </datagrid>
  826. <caption id="caption23" style="left:178px; top:5px; width:15px; height:20px; font-weight:bold; vertical-align:middle; ">~</caption>
  827. <input id="ipt_reqfrdd" ref="/root/send/goodwin/purcdmndfrdd" class="input_s_essential" inputtype="date" style="left:74px; top:5px; width:100px; height:19px; "/>
  828. <input id="ipt_reqtodd" ref="/root/send/goodwin/purcdmndtodd" class="input_s_essential" inputtype="date" style="left:194px; top:5px; width:100px; height:19px; ">
  829. <script type="javascript" ev:event="xforms-value-changed">
  830. <![CDATA[
  831. btn_search.dispatch("DOMActivate");
  832. ]]>
  833. </script>
  834. </input>
  835. <button id="btnselect" class="btn2_letter9" style="left:1074px; top:4px; width:119px; height:19px; ">
  836. <caption>전체/전체선택 취소</caption>
  837. <script type="javascript" ev:event="DOMActivate">
  838. <![CDATA[
  839. for(var liRow = grd_nonwin.fixedRows; liRow < grd_nonwin.rows ; liRow++)
  840. {
  841. if(grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("select")) == "Y")
  842. {
  843. model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/select" ,"N");
  844. model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winqty" ,0);
  845. model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winpackqty" ,0);
  846. model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winamt" ,0);
  847. grd_nonwin.rowStatus(liRow) = "0";
  848. }
  849. else
  850. {
  851. var CaleWinAmt = ( grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("reqpackcnt"))- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("prewinpackqty")))*grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("goodunitcost"))
  852. grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("select"))="Y";
  853. grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("winpackqty"))=(grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("reqpackcnt"))- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("prewinpackqty")));
  854. grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("winqty"))=( grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("reqqty"))- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("prewinqty")) );
  855. grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("winamt"))= CaleWinAmt;
  856. grd_nonwin.rowStatus(liRow) = "2";
  857. }
  858. //fCalcWinamt(liRow);
  859. }
  860. fWinqtyTotal(sch_select.selectedIndex);
  861. model.refresh();
  862. ]]>
  863. </script>
  864. </button>
  865. <line id="line2" class="line_1" style="x1:0px; y1:25; x2:1193; y2:25; "/>
  866. <caption id="caption8" style="left:15px; top:5px; width:80px; height:23px; font-weight:bold; vertical-align:middle; ">구매일자 :</caption>
  867. <output id="opt_sumreqqty" ref="/root/init/reqcnt" class="output_default" format="#,###" style="left:363px; top:4px; width:56px; height:19px; font-weight:bold; "/>
  868. <caption id="caption4" style="left:430px; top:4px; width:67px; height:23px; font-weight:bold; vertical-align:middle; ">구매금액 :</caption>
  869. <caption id="caption5" style="left:299px; top:4px; width:67px; height:23px; font-weight:bold; vertical-align:middle; ">구매건수 :</caption>
  870. <output id="opt_sumreqfla" ref="/root/init/reqamt" class="output_default" format="#,###" style="left:494px; top:4px; width:85px; height:19px; font-weight:bold; "/>
  871. <caption id="cap_winqtytotal" style="left:717px; top:4px; width:67px; height:23px; vertical-align:middle; ">입고금액 :</caption>
  872. <output id="opt_winqtycnt" ref="/root/init/winqtycnt" class="output_default" format="#,###" style="left:647px; top:4px; width:56px; height:19px; font-weight:bold; text-align:right; "/>
  873. <caption id="caption10" style="left:588px; top:4px; width:67px; height:23px; vertical-align:middle; ">입고건수 :</caption>
  874. <output id="opt_winqtytotal" ref="/root/init/winqtytotal" class="output_default" format="#,###" style="left:776px; top:4px; width:85px; height:19px; font-weight:bold; text-align:right; "/>
  875. </case>
  876. <case id="cse_win" style="left:0px; top:0px; width:1193px; height:638; ">
  877. <datagrid id="grd_goodwin" nodeset="/root/main/list/goodwin/goodwinlist" class="datagrid2" caption="입고부서명^순번^발주번호^약품코드*^약품명^구매년월/차수^구매년월/차수^함량^포장수량^모델^제조회사^낱개수량^포장^포장^포장^단가^입고금액^출고수량^잔량^기관코드^물품구분^입고일자^입고자^입고부서^장소^계산구분^가납여부^전자계산방법^전자계산유무^입출력^부서^요구일자^요구번호^요구순번^출고번호^출고순번^보나에스코드^calcdocudd^profno^계정코드^청구일자^청구번호^청구순번^valiterm^재고유무^체크일자^체크자^체크유무^슬립일자^슬립번호^공급처코드^비고^이전입고량^caption1^caption2^caption3^caption4" colsep="^" colwidth="89, 52, 0, 116, 273, 66, 36, 78, 62, 0, 0, 71, 60, 63, 63, 86, 100, 59, 52, 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="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:30px; width:1193px; height:598px; ">
  878. <col ref="windeptnm" style="text-align:center; "/>
  879. <col ref="winseqno" visibility="hidden" style="text-align:center; "/>
  880. <col ref="winno" visibility="hidden"/>
  881. <col ref="goodcd" _key="true"/>
  882. <col ref="goodnm"/>
  883. <col ref="purcdmndmm" format="yyyy-mm" style="text-align:center; "/>
  884. <col ref="purcdmndno" style="text-align:center; "/>
  885. <col ref="goodspec"/>
  886. <col ref="winpackqty" type="input" format="#,###" maxlength="9" style="text-align:right; "/>
  887. <col ref="goodmodel" visibility="hidden"/>
  888. <col ref="prodcmpynm" visibility="hidden"/>
  889. <col ref="winqty" type="output" format="#,###" maxlength="9" style="text-align:right; "/>
  890. <col ref="winpackcntperunit" format="#,###" maxlength="9" style="text-align:right; "/>
  891. <col ref="winpackunit" style="text-align:center; "/>
  892. <col ref="winunit" style="text-align:center; "/>
  893. <col ref="winunitcost" format="#,###.##" maxlength="14" style="text-align:right; "/>
  894. <col ref="winamt" format="#,###.##" maxlength="14" style="text-align:right; "/>
  895. <col ref="predelivedeptqty" visibility="hidden" format="#,###" maxlength="14" style="text-align:right; "/>
  896. <col ref="stocqty" visibility="hidden" format="#,###" maxlength="14" style="text-align:right; "/>
  897. <col ref="instcd" visibility="hidden"/>
  898. <col ref="goodflag" visibility="hidden"/>
  899. <col ref="windd" visibility="hidden"/>
  900. <col ref="winpsn" visibility="hidden"/>
  901. <col ref="windeptcd" visibility="hidden"/>
  902. <col ref="installplcecd" visibility="hidden"/>
  903. <col ref="paycond" visibility="hidden"/>
  904. <col ref="temppay" visibility="hidden"/>
  905. <col ref="calcdocukind" visibility="hidden"/>
  906. <col ref="elctstmntyn" visibility="hidden"/>
  907. <col ref="iokind" visibility="hidden"/>
  908. <col ref="suplplcecd" visibility="hidden"/>
  909. <col ref="purcdmnddd" visibility="hidden"/>
  910. <col ref="purcdmndno" visibility="hidden"/>
  911. <col ref="purcdmndseq" visibility="hidden"/>
  912. <col ref="deliveno" visibility="hidden"/>
  913. <col ref="deliveseqno" visibility="hidden"/>
  914. <col ref="bnscd" visibility="hidden"/>
  915. <col ref="calcdocudd" visibility="hidden"/>
  916. <col ref="profno" visibility="hidden"/>
  917. <col ref="acntcd" visibility="hidden"/>
  918. <col ref="reqdd" visibility="hidden"/>
  919. <col ref="reqno" visibility="hidden"/>
  920. <col ref="reqseqno" visibility="hidden"/>
  921. <col ref="valiterm" visibility="hidden"/>
  922. <col ref="stocynindx" visibility="hidden"/>
  923. <col ref="chkdd" visibility="hidden"/>
  924. <col ref="chkpsn" visibility="hidden"/>
  925. <col ref="chkyn" visibility="hidden"/>
  926. <col ref="slipdd" visibility="hidden"/>
  927. <col ref="slipno" visibility="hidden"/>
  928. <col ref="suppcustcd" visibility="hidden"/>
  929. <col ref="cmt" visibility="hidden"/>
  930. <col ref="prewinqty" visibility="hidden"/>
  931. <col ref="minexch" visibility="hidden"/>
  932. <col ref="reqqty" visibility="hidden"/>
  933. <col ref="reqdeptcd" visibility="hidden"/>
  934. <col ref="purccondd" visibility="hidden"/>
  935. <col ref="purcconno" visibility="hidden"/>
  936. <col ref="purcconseq" visibility="hidden"/>
  937. <script type="javascript" ev:event="onbuttonclick">
  938. <![CDATA[
  939. if (grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.rowStatus(grd_goodwin.row) == "1" ) {//구성물품코드를 눌렀을 경우
  940. model.removenode("/root/copynode");
  941. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  942. model.makeNode("/root/copynode");
  943. rszfOpenPopUpListByWndName(grd_goodwin,"","goodcd,goodnm","SPRSD00190","instcd,goodflag","ipt_instcd,cmb_goodflag");
  944. var cur_row = grd_goodwin.row;
  945. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  946. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  947. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  948. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  949. }
  950. ]]>
  951. </script>
  952. <script type="javascript" ev:event="onrowchanged">
  953. <![CDATA[
  954. // ipt_cmt.value = model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/cmt");
  955. // //misfGridInit(grd_goodreq);
  956. //
  957. // if(grd_goodwin.rowStatus(grd_goodwin.row) != "1" && model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/purcdmnddd").length > 0)
  958. // {
  959. // misfMsterDetailRetrieve();
  960. // }
  961. // else misfGridInit(grd_goodreq);
  962. // ]]>
  963. </script>
  964. <script type="javascript" ev:event="xforms-value-changed">
  965. <![CDATA[
  966. if(grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("goodcd")).length> 0) {
  967. model.removenode("/root/copynode");
  968. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  969. model.makeNode("/root/copynode");
  970. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodcd," + model.getValue(ipt_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","ipt_instcd," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag"),"Y");
  971. model.refresh();
  972. if( grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length> 0)
  973. {
  974. 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") );
  975. else model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit","1");
  976. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" ,model.getValue("/root/init/main/goodlist/purcunit"));
  977. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , model.getValue("/root/init/main/goodlist/purcunit"));
  978. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" ,1);
  979. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , model.getValue("/root/init/main/goodlist/goodunitcost"));
  980. }
  981. model.recalculate();
  982. model.refresh();
  983. var cur_row = grd_goodwin.row;
  984. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  985. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  986. if(CSV.length == 0 && grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length == 0)
  987. {
  988. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodcd" , "");
  989. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodnm" , "");
  990. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodspec" , "");
  991. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodmodel" , "");
  992. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/prodcmpynm" , "");
  993. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" , "");
  994. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" , "");
  995. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , "");
  996. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , "");
  997. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackcntperunit" , "");
  998. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , "");
  999. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winamt" , "");
  1000. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  1001. grd_goodwin.editCell();
  1002. }
  1003. if(CSV.length > 0)
  1004. {
  1005. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodcd","");
  1006. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  1007. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  1008. }
  1009. }
  1010. if(grd_goodwin.col == grd_goodwin.colRef("winpackqty")){
  1011. fCalcWinamt(sch_select.selectedIndex,grd_goodwin.row - grd_goodwin.fixedRows + 1);
  1012. fWinqtyTotal(sch_select.selectedIndex);
  1013. }
  1014. ]]>
  1015. </script>
  1016. <script type="javascript" ev:event="onkeydown">
  1017. <![CDATA[
  1018. if(event.keyCode == 9)
  1019. {
  1020. if(event.shiftKey)
  1021. {
  1022. if(grd_goodwin.colAttribute(grd_goodwin.col + 1, "type").indexOf ("input") > -1)
  1023. {
  1024. for(curcol = grd_goodwin.col -1 ; curcol > -1 ; curcol--)
  1025. {
  1026. if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  1027. {
  1028. grd_goodwin.col = curcol;
  1029. grd_goodwin.editCell();
  1030. return;
  1031. }
  1032. }
  1033. }
  1034. }
  1035. else
  1036. {
  1037. if(grd_goodwin.colAttribute(grd_goodwin.col, "type").indexOf ("input") == -1)
  1038. {
  1039. if(grd_goodwin.col - 1 == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.col - 1).length == 0)
  1040. {
  1041. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  1042. grd_goodwin.editCell();
  1043. return;
  1044. }
  1045. for(curcol = grd_goodwin.col ; curcol <grd_goodwin.cols ; curcol++)
  1046. {
  1047. if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  1048. {
  1049. grd_goodwin.col = curcol;
  1050. grd_goodwin.editCell();
  1051. return;
  1052. }
  1053. }
  1054. }
  1055. }
  1056. }
  1057. ]]>
  1058. </script>
  1059. <script type="javascript" ev:event="onaftersort">
  1060. <![CDATA[
  1061. grd_goodwin.gridToInstance();
  1062. ]]>
  1063. </script>
  1064. <script type="javascript" ev:event="onendedit">
  1065. <![CDATA[
  1066. if(grd_goodwin.col == grd_goodwin.colRef("winpackqty")){
  1067. if(grd_goodwin.row < grd_goodwin.rows - grd_goodwin.fixedRows){
  1068. grd_goodwin.row = grd_goodwin.row + 1;
  1069. grd_goodwin.select(grd_goodwin.row, grd_goodwin.colRef("winpackqty")) = true;
  1070. }
  1071. }
  1072. ]]>
  1073. </script>
  1074. </datagrid>
  1075. <caption id="caption3" class="tit_2" style="left:5px; top:10px; width:118px; height:13px; ">입고내역</caption>
  1076. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:1193; y2:25px; "/>
  1077. <button id="btn_choidel" class="btn2_letter3" style="left:1140px; top:4px; width:53px; height:19px; ">
  1078. <caption>행삭제</caption>
  1079. <script type="javascript" ev:event="DOMActivate">
  1080. <![CDATA[
  1081. misfGridIUD(grd_goodwin, "D");
  1082. ]]>
  1083. </script>
  1084. </button>
  1085. <output id="ipt_sumwinqty" ref="/root/init/winqty" class="output_default" style="left:757px; top:4px; width:70px; height:19px; font-weight:bold; "/>
  1086. <output id="opt_sumwinamt" ref="/root/init/winamt" class="output_default" format="#,###" style="left:911px; top:4px; width:125px; height:19px; font-weight:bold; "/>
  1087. <button id="btn_insert" class="btn2_letter3" visibility="hidden" style="left:1085px; top:4px; width:53px; height:19px; ">
  1088. <caption>행추가</caption>
  1089. <script type="javascript" ev:event="DOMActivate">
  1090. <![CDATA[
  1091. //if(fCheckRetrieveData(true) == false)return;
  1092. misfGridIUD(grd_goodwin, "A");
  1093. grd_goodwin.row = grd_goodwin.rows -grd_goodwin.fixedRows ;
  1094. // ipt_cmt.value = "";
  1095. fDefaultSetting(grd_goodwin.row );
  1096. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  1097. grd_goodwin.editCell();
  1098. ]]>
  1099. </script>
  1100. </button>
  1101. <caption id="caption1" style="left:690px; top:4px; width:70px; height:23px; font-weight:bold; vertical-align:middle; ">입고건수 :</caption>
  1102. <caption id="caption2" style="left:844px; top:4px; width:70px; height:23px; font-weight:bold; vertical-align:middle; ">입고합계 :</caption>
  1103. </case>
  1104. </switch>
  1105. <button id="button2" class="btn_sw" group="tab" style="left:124px; top:75px; width:144px; height:22px; ">
  1106. <caption>입고관리</caption>
  1107. <toggle case="cse_win" ev:event="DOMActivate">fSetPosition(false);</toggle>
  1108. </button>
  1109. <button id="button6" class="btn_sw" group="tab" selected="true" style="left:0px; top:75px; width:125px; height:22px; ">
  1110. <caption>미입고조회/입고</caption>
  1111. <toggle case="cse_nonwin" ev:event="DOMActivate"/>
  1112. </button>
  1113. <input id="ipt_iokind" ref="/root/send/goodwin/iokind" visibility="hidden" style="left:1095px; top:45px; width:10px; height:19px; "/>
  1114. <line id="line5" class="line_4" style="x1:1109px; y1:18px; x2:1109px; y2:61px; border-color:#ffe4bb; border-left-style:solid; "/>
  1115. <caption id="caption11" class="search_name" style="left:20px; top:29px; width:86px; height:17px; ">입고일자 :</caption>
  1116. <caption id="caption12" class="search_name" visibility="hidden" style="left:378px; top:29px; width:86px; height:17px; ">출고부서 :</caption>
  1117. <input id="ipt_instcd" ref="/root/send/goodwin/instcd" visibility="hidden" style="left:1070px; top:15px; width:30px; height:19px; "/>
  1118. <select1 id="cmb_windeptcd" ref="/root/send/goodwin/windeptcd" class="combo_s_essential" disabled="true" visibility="hidden" appearance="minimal" style="left:468px; top:30px; width:160px; height:19px; text-align:center; ">
  1119. <choices>
  1120. <itemset>
  1121. <label/>
  1122. <value/>
  1123. </itemset>
  1124. </choices>
  1125. <script type="javascript" ev:event="xforms-value-changed">
  1126. <![CDATA[
  1127. // if (model.getValue(chk_nonautowinyn.attribute("ref")) !='Y' ) {
  1128. misfGridInit(grd_nonwin);
  1129. // 보나에스번호 조회
  1130. ///fLoadBnsDeliveno("N");
  1131. model.refresh();
  1132. // }
  1133. ]]>
  1134. </script>
  1135. </select1>
  1136. <output id="opt_interfacegubn" ref="/root/send/goodwin/interfacegubn" visibility="hidden" style="left:1070px; top:45px; width:20px; height:19px; "/>
  1137. <script type="javascript" ev:event="xforms-valid">
  1138. <![CDATA[
  1139. if(ipt_suplplcenm.value.length == 0)
  1140. ipt_suplplcecd.value = "";
  1141. else
  1142. rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm",
  1143. model.getValue(cmb_instcd.attribute("ref")) +",," + model.getValue(ipt_suplplcenm.attribute("ref")),"","suplplcecd,suplplcenm" ,
  1144. ipt_suplplcenm,"SPRSD00220","instcd","cmb_instcd");
  1145. model.refresh();
  1146. ]]>
  1147. </script>
  1148. <output id="opt_calcdocukind" ref="/root/send/goodwin/calcdocukind" visibility="hidden" style="left:1050px; top:45px; width:15px; height:19px; "/>
  1149. </group>
  1150. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  1151. <button id="button3" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  1152. <caption>출력</caption>
  1153. </button>
  1154. <button id="btn_init" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  1155. <caption>초기화</caption>
  1156. <script type="javascript" ev:event="DOMActivate">
  1157. <![CDATA[
  1158. fInitialize();
  1159. ]]>
  1160. </script>
  1161. </button>
  1162. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  1163. <button id="btn_save" class="btn4_letter2" style="left:1070px; top:3px; width:56px; height:22px; ">
  1164. <caption>저장</caption>
  1165. <script type="javascript" ev:event="DOMActivate">
  1166. <![CDATA[
  1167. if(sch_select.selectedIndex == 0)
  1168. {
  1169. if(fCheckSaveData() == false)return;
  1170. if(fSettingSaveInData()== false) return;
  1171. //model.setValue("/root/send/savenonwin/interfacecustcdlist/purc_main_suplplcecd",rszfGetMainCust(purc_main_suplplcecd));
  1172. //model.setValue("/root/send/savenonwin/interfacecustcdlist/drg_main_suplplcecd",rszfGetMainCust(drg_main_suplplcecd));
  1173. model.setValue("/root/send/savenonwin/goodnonwinlist", grd_nonwin.getUpdateData());
  1174. submit("TXRSI00102");
  1175. if (model.getValue(gvErrorMsgPath + "/type") != "error")
  1176. {
  1177. //if (ipt_suplplcecd.value==rszfGetMainCust(drg_main_suplplcecd)) fLoadBnsDeliveno("N");
  1178. //model.removenode("/root/send/savenonwin/goodnowintype"); // 보나에스 입고 파일로 저장할 경우 지정되는 노드.. 저장후 초기화 한다.
  1179. btn_search.dispatch("DOMActivate");
  1180. }
  1181. }
  1182. else
  1183. {
  1184. //model.setValue("/root/send/save/interfacecustcdlist/purc_main_suplplcecd",rszfGetMainCust(purc_main_suplplcecd));
  1185. //model.setValue("/root/send/save/interfacecustcdlist/drg_main_suplplcecd",rszfGetMainCust(drg_main_suplplcecd));
  1186. model.setValue("/root/send/save/goodwinlist", grd_goodwin.getUpdateData());
  1187. submit("TXRSI00101");
  1188. if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
  1189. }
  1190. ]]>
  1191. </script>
  1192. </button>
  1193. </group>
  1194. </xhtml:body>
  1195. </xhtml:html>