SMRSI01800_제제약 입고관리.xrw 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042
  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. <goodwindelive>
  16. <goodwindelivelist/>
  17. </goodwindelive>
  18. <goodreq>
  19. <goodreqlist/>
  20. </goodreq>
  21. </list>
  22. <item/>
  23. </main>
  24. <send>
  25. <save>
  26. <goodwinlist/>
  27. <goodnonwinlist/>
  28. </save>
  29. <goodreq>
  30. <instcd/>
  31. <goodflag/>
  32. <reqfrdd/>
  33. <reqtodd/>
  34. </goodreq>
  35. <goodwin>
  36. <instcd/>
  37. <goodflag>PH</goodflag>
  38. <windd/>
  39. <winno/>
  40. <winpsn/>
  41. <winpsnnm/>
  42. <windeptcd/>
  43. <windeptnm/>
  44. <installplcecd/>
  45. <installplcenm/>
  46. <paycond/>
  47. <suplplcecd/>
  48. <suplplcenm/>
  49. <temppay/>
  50. <calcdocukind/>
  51. <elctstmntyn/>
  52. <calcdocudd/>
  53. <purcdmndfrdd/>
  54. <purcdmndtodd/>
  55. <addtax/>
  56. <proddrugsetflag/>
  57. <retrmaxwinnoyn/>
  58. </goodwin>
  59. <gooddmndreq>
  60. <instcd/>
  61. <goodflag/>
  62. <purcdmnddd/>
  63. <purcdmndno/>
  64. <purcdmndseq/>
  65. </gooddmndreq>
  66. <savenonwin>
  67. <goodnonwinlist/>
  68. </savenonwin>
  69. <goodwindelive>
  70. <instcd/>
  71. <goodflag/>
  72. <windd/>
  73. <winno/>
  74. <winseqno/>
  75. </goodwindelive>
  76. <gooddelive>
  77. <gooddelivelist/>
  78. </gooddelive>
  79. </send>
  80. <init>
  81. <temppay>
  82. <label>예</label>
  83. <value>Y</value>
  84. <label>아니오</label>
  85. <value>N</value>
  86. </temppay>
  87. <elctstmntyn>
  88. <label>예</label>
  89. <value>Y</value>
  90. <label>아니오</label>
  91. <value>N</value>
  92. </elctstmntyn>
  93. <winqty/>
  94. <winamt/>
  95. </init>
  96. <hidden/>
  97. <temp/>
  98. <copynode/>
  99. </root>
  100. </instance>
  101. <bind id="winqty" ref="/root/main/list/goodwin/goodwinlist/winqty" calculate="../winpackqty *../winpackcntperunit"/>
  102. <bind id="winamt" ref="/root/main/list/goodwin/goodwinlist/winamt" calculate="(../winpackqty *../winpackcntperunit) * ../winunitcost"/>
  103. <bind id="delivedeptqty" ref="/root/main/list/gooddmndreq/gooddmndreqlist/delivedeptqty" calculate="../deliveqty"/>
  104. <script type="javascript" ev:event="xforms-ready">
  105. <![CDATA[
  106. //화면 Control을 초기화한다
  107. fCheckAuth();
  108. fInitialize();
  109. ]]>
  110. </script>
  111. <submission id="TRRSI00101" ref="/root/send/goodwin" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/list/goodwin"/>
  112. <submission id="TRRSD02001" ref="/root/send/goodreq" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/list/goodreq"/>
  113. <submission id="TRRSI01802" ref="/root/send/goodwindelive" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/list/goodwindelive"/>
  114. <submission id="TXRSI00101" ref="/root/send/save" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/hidden/temp">"</submission>
  115. <submission id="TXRSO00101" ref="/root/send/gooddelive" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/hidden/temp">"</submission>
  116. </model>
  117. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  118. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  119. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  120. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  121. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  122. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  123. <script type="javascript">
  124. <![CDATA[
  125. function fInitialize() {
  126. model.resetInstanceNode("/root/send");
  127. //rszfUserGoodFlagList(cmb_goodflag,getUserInfo("userid"));
  128. rszfUserInstList(cmb_instcd,getUserInfo("userid"));
  129. misfGridInit(grd_goodwin);
  130. misfGridInit(grd_goodreq);
  131. misfGridInit(grd_delive);
  132. misfMsterDetailSet(grd_goodwin,null, "TRRSI00101" ,"Y");
  133. misfMsterDetailSet(grd_delive,grd_goodwin, "TRRSI01802" ,"N");
  134. var curdate = getCurrentDate();
  135. var cvtdate = curdate.toDate("YYYYMMDD");
  136. model.setValue(ipt_windd.attribute("ref") ,curdate);
  137. model.setValue(ipt_reqfrdd.attribute("ref") ,cvtdate.getAddDate(-10,"D").getDateFormat("YYYYMMDD"));
  138. model.setValue(ipt_reqtodd.attribute("ref") ,curdate);
  139. model.setValue(ipt_sumwinqty.attribute("ref"),0);
  140. model.setValue(opt_sumwinamt.attribute("ref"),0);
  141. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  142. model.setValue(ipt_windeptcd.attribute("ref") , getUserInfo("dutplcecd"));
  143. model.setValue(ipt_windeptnm.attribute("ref") , getUserInfo("dutplcenm"));
  144. model.setValue(ipt_winpsn.attribute("ref") , getUserInfo("userid"));
  145. model.setValue(ipt_winpsnnm.attribute("ref") , getUserInfo("usernm"));
  146. grd_goodwin.explorerbar = "sortshow";
  147. grd_goodreq.explorerbar = "sortshow";
  148. grd_goodreq.frozenCols = grd_goodreq.colRef("goodnm");
  149. grd_goodwin.frozenCols = grd_goodwin.colRef("winunit");
  150. if(cmb_goodflag.length> 0) cmb_goodflag.selectedindex= 0;
  151. model.refresh();
  152. }
  153. function fCheckAuth() {
  154. btn_search.disabled = !checkAuth("R") ;
  155. btn_save.disabled = !checkAuth("X") ;
  156. }
  157. function fCheckRetrieveData(pmsg)
  158. {
  159. if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
  160. {
  161. if(pmsg == true)
  162. {
  163. messageBox("기관코드를 " ,"C002");
  164. model.setFocus("cmb_instcd");
  165. }
  166. return false;
  167. }
  168. if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
  169. {
  170. if(pmsg == true)
  171. {
  172. messageBox("물품구분을 " ,"C002");
  173. model.setFocus("cmb_goodflag");
  174. }
  175. return false;
  176. }
  177. if(model.getValue(ipt_winpsn.attribute("ref")).length== 0 )
  178. {
  179. if(pmsg == true)
  180. {
  181. messageBox("입고담당자를 " ,"C001");
  182. model.setFocus("ipt_winpsn");
  183. }
  184. return false;
  185. }
  186. if(model.getValue(ipt_windeptcd.attribute("ref")).length== 0 )
  187. {
  188. if(pmsg == true)
  189. {
  190. messageBox("입고부서를 " ,"C001");
  191. model.setFocus("ipt_windeptcd");
  192. }
  193. return false;
  194. }
  195. if(sch_select.selectedIndex == 0)
  196. {
  197. if(model.getValue(ipt_reqfrdd.attribute("ref")).length== 0 )
  198. {
  199. if(pmsg == true)
  200. {
  201. messageBox("발주시작일자 " ,"C001");
  202. model.setFocus("ipt_reqfrdd");
  203. }
  204. return false;
  205. }
  206. if(model.getValue(ipt_reqtodd.attribute("ref")).length== 0 )
  207. {
  208. if(pmsg == true)
  209. {
  210. messageBox("발주종료일자 " ,"C001");
  211. model.setFocus("ipt_reqtodd");
  212. }
  213. return false;
  214. }
  215. return true;
  216. }
  217. else
  218. {
  219. if(model.getValue(ipt_windd.attribute("ref")).length== 0 )
  220. {
  221. if(pmsg == true)
  222. {
  223. messageBox("입고일자를 " ,"C001");
  224. model.setFocus("ipt_windd");
  225. }
  226. return false;
  227. }
  228. }
  229. return true;
  230. }
  231. function fDefaultSetting(prow)
  232. {
  233. var grd_setting;
  234. if(sch_select.selectedIndex == 0)grd_setting = grd_goodreq;
  235. else grd_setting = grd_goodwin;
  236. model.setValue(grd_setting.nodeset+"["+prow+"]/instcd",model.getValue(cmb_instcd.attribute("ref")));
  237. model.setValue(grd_setting.nodeset+"["+prow+"]/goodflag",model.getValue(cmb_goodflag.attribute("ref")));
  238. model.setValue(grd_setting.nodeset+"["+prow+"]/windd",model.getValue(ipt_windd.attribute("ref")));
  239. model.setValue(grd_setting.nodeset+"["+prow+"]/winpsn",model.getValue(ipt_winpsn.attribute("ref")));
  240. model.setValue(grd_setting.nodeset+"["+prow+"]/windeptcd",model.getValue(ipt_windeptcd.attribute("ref")));
  241. model.setValue(grd_setting.nodeset+"["+prow+"]/installplcecd",model.getValue("/root/send/goodwin/installplcecd"));
  242. model.setValue(grd_setting.nodeset+"["+prow+"]/paycond",model.getValue("/root/send/goodwin/paycond"));
  243. model.setValue(grd_setting.nodeset+"["+prow+"]/temppay",model.getValue("/root/send/goodwin/temppay"));
  244. model.setValue(grd_setting.nodeset+"["+prow+"]/calcdocukind",model.getValue("/root/send/goodwin/calcdocukind"));
  245. model.setValue(grd_setting.nodeset+"["+prow+"]/calcdocudd",model.getValue("/root/send/goodwin/calcdocudd"));
  246. model.setValue(grd_setting.nodeset+"["+prow+"]/suplplcecd",model.getValue("/root/send/goodwin/suplplcecd"));
  247. model.setValue(grd_setting.nodeset+"["+prow+"]/winseqno",fGetMaxWinSeqNo());
  248. model.setValue(grd_setting.nodeset+"["+prow+"]/iokind","Y");
  249. model.setValue(grd_setting.nodeset+"["+prow+"]/delivedeptqty",0);
  250. model.setValue(grd_setting.nodeset+"["+prow+"]/deliveno",0);
  251. model.setValue(grd_setting.nodeset+"["+prow+"]/stocqty",0);
  252. }
  253. function fGetMaxWinSeqNo()
  254. {
  255. var maxwinseqno = "";
  256. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows; currow++)
  257. {
  258. if(maxwinseqno < grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winseqno")))
  259. maxwinseqno = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winseqno"));
  260. }
  261. if(maxwinseqno.length == 0)maxwinseqno = "001";
  262. else maxwinseqno = parseInt(maxwinseqno) + 1;
  263. maxwinseqno = "" + maxwinseqno;
  264. return maxwinseqno.getLeftPad(3,"0");
  265. }
  266. function fSettingGoodList(pnode, nodename, userqtynm){
  267. var codynode = instance1.selectNodes(pnode + "/*");
  268. var addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
  269. if(model.getValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
  270. for (var j = 1; j <= codynode.length ; j++) {
  271. if(addRow > grd_goodwin.rows - grd_goodwin.fixedRows)
  272. {
  273. misfGridIUD(grd_goodwin,"A");
  274. addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
  275. fDefaultSetting(addRow );
  276. }
  277. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd"));
  278. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm"));
  279. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec"));
  280. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel"));
  281. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm"));
  282. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/" + userqtynm));
  283. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
  284. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
  285. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/" + userqtynm));
  286. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/suplplcecd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/maincustlastsuplplce"));
  287. if(model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty") != "0" && model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty").length>0)
  288. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty"));
  289. else
  290. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" ,"1");
  291. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunitcost" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodunitcost"));
  292. addRow = addRow + 1;
  293. }
  294. model.recalculate();
  295. model.refresh();
  296. }
  297. function fSettingPreSaveData()
  298. {
  299. for(var liRow = grd_goodreq.fixedRows ; liRow < grd_goodreq.rows ; liRow++)
  300. {
  301. //출고생성되지 않은 데이타라면 출고시 입력을 위해 insert logic으로 구현한다
  302. if((grd_goodreq.valueMatrix(liRow ,"delivedd").length == 0 ||
  303. grd_goodreq.valueMatrix(liRow ,"deliveno").length == 0 ||
  304. grd_goodreq.valueMatrix(liRow ,"deliveseqno").length == 0) &&
  305. grd_goodreq.rowStatus(liRow) == "1")grd_goodreq.rowStatus(liRow) = "2";
  306. }
  307. }
  308. function fSettingSaveOutData(pAll)
  309. {
  310. var chkins = false;
  311. for(var liRow = grd_delive.fixedRows ; liRow < grd_delive.rows ; liRow++)
  312. {
  313. if((grd_delive.valueMatrix(liRow ,grd_delive.colRef("delivedd")).length == 0 ||
  314. grd_delive.valueMatrix(liRow ,grd_delive.colRef("deliveno")).length == 0 ||
  315. grd_delive.valueMatrix(liRow ,grd_delive.colRef("deliveseqno")).length == 0))
  316. {
  317. chkins = true;
  318. break;
  319. }
  320. }
  321. if(chkins == true)
  322. {
  323. if(model.getValue(ipt_windeptcd.attribute("ref")).length== 0 )
  324. {
  325. messageBox("입고부서를 " ,"C002");
  326. model.setFocus("ipt_windeptcd");
  327. return false;
  328. }
  329. if(model.getValue(ipt_winpsn.attribute("ref")).length== 0 )
  330. {
  331. messageBox("입고자를 " ,"C002");
  332. model.setFocus("ipt_winpsn");
  333. return false;
  334. }
  335. }
  336. var rowstatus = "";
  337. for(var liRow = grd_delive.fixedRows ; liRow < grd_delive.rows ; liRow++)
  338. {
  339. if(pAll)model.setValue(grd_delive.nodeset + "[" + (liRow - grd_delive.fixedRows + 1) + "]/delivedeptqty" , model.getValue(grd_delive.nodeset + "[" + (liRow - grd_delive.fixedRows + 1) + "]/stocqty"));
  340. //출고생성되지 않은 데이타라면 출고시 입력을 위해 insert logic으로 구현한다
  341. if((grd_delive.valueMatrix(liRow ,grd_delive.colRef("delivedd")).length == 0 ||
  342. grd_delive.valueMatrix(liRow ,grd_delive.colRef("deliveno")).length == 0 ||
  343. grd_delive.valueMatrix(liRow ,grd_delive.colRef("deliveseqno")).length == 0))
  344. {
  345. model.setValue(grd_delive.nodeset + "[" + (liRow - grd_delive.fixedRows + 1) + "]/deliveunit" , grd_delive.valueMatrix(liRow ,grd_delive.colRef("winpackunit")));
  346. model.setValue(grd_delive.nodeset + "[" + (liRow - grd_delive.fixedRows + 1) + "]/delivedeptcd" , model.getValue(ipt_windeptcd.attribute("ref")));
  347. model.setValue(grd_delive.nodeset + "[" + (liRow - grd_delive.fixedRows + 1) + "]/delivepsn" , model.getValue(ipt_winpsn.attribute("ref")));
  348. if(grd_delive.rowStatus(liRow) == "2" || grd_delive.rowStatus(liRow) == "0")grd_delive.rowStatus(liRow) = "1";
  349. }
  350. }
  351. model.setValue("/root/send/gooddelive/gooddelivelist", grd_delive.getUpdateData());
  352. submit("TXRSO00101");
  353. if (model.getValue(gvErrorMsgPath + "/type") != "error")submit("TRRSI01802");
  354. else
  355. {
  356. for(var liRow = grd_delive.fixedRows ; liRow < grd_delive.rows ; liRow++)
  357. {
  358. //출고생성되지 않은 데이타라면 출고시 입력을 위해 insert logic으로 구현한다
  359. if((grd_delive.valueMatrix(liRow ,grd_delive.colRef("delivedd")).length == 0 ||
  360. grd_delive.valueMatrix(liRow ,grd_delive.colRef("deliveno")).length == 0 ||
  361. grd_delive.valueMatrix(liRow , grd_delive.colRef("deliveseqno")).length == 0) &&
  362. grd_delive.rowStatus(liRow) == "1")grd_delive.rowStatus(liRow) = "2";
  363. }
  364. }
  365. }
  366. function fCheckSaveData()
  367. {
  368. if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
  369. {
  370. messageBox("기관코드를 " ,"C002");
  371. model.setFocus("cmb_instcd");
  372. return false;
  373. }
  374. if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
  375. {
  376. messageBox("물품구분을 " ,"C002");
  377. model.setFocus("cmb_goodflag");
  378. return false;
  379. }
  380. if(model.getValue(ipt_windd.attribute("ref")).length== 0 )
  381. {
  382. messageBox("입고일자를 " ,"C001");
  383. model.setFocus("ipt_windd");
  384. return false;
  385. }
  386. /*
  387. if(model.getValue(ipt_winpsn.attribute("ref")).length== 0 )
  388. {
  389. messageBox("입고담당자를 " ,"C001");
  390. model.setFocus("ipt_winpsn");
  391. return false;
  392. }
  393. if(model.getValue(ipt_windeptcd.attribute("ref")).length== 0 )
  394. {
  395. messageBox("입고부서를 " ,"C001");
  396. model.setFocus("ipt_windeptcd");
  397. return false;
  398. }
  399. */
  400. if(sch_select.selectedIndex == 1)
  401. {
  402. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  403. {
  404. if((grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winpackqty")).length == 0 || grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winpackqty")) == 0) ||
  405. (grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winpackcntperunit")).length == 0 || grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winpackcntperunit")) == 0))
  406. {
  407. messageBox(currow + " 번째 입고량을 " ,"C001");
  408. grd_goodwin.endEditCell();
  409. grd_goodwin.row = currow;
  410. grd_goodwin.col= grd_goodwin.colRef("winpackqty");
  411. grd_goodwin.editCell();
  412. return false;
  413. }
  414. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winunitcost")).length == 0 || grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winunitcost")) == 0)
  415. {
  416. messageBox(currow + " 번째 단가를 " ,"C001");
  417. grd_goodwin.endEditCell();
  418. grd_goodwin.row = currow;
  419. grd_goodwin.col= grd_goodwin.colRef("winunitcost");
  420. grd_goodwin.editCell();
  421. return false;
  422. }
  423. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")).length == 0)
  424. {
  425. messageBox(currow + " 번째 물품코드를 " ,"C001");
  426. grd_goodwin.row = currow;
  427. grd_goodwin.col= grd_goodwin.colRef("goodcd");
  428. grd_goodwin.editCell();
  429. return false;
  430. }
  431. else
  432. {
  433. for(srcrow = currow + 1 ; srcrow < grd_goodwin.rows ; srcrow++)
  434. {
  435. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")) == grd_goodwin.valueMatrix(srcrow , grd_goodwin.colRef("goodcd")))
  436. {
  437. messageBox("동일 물품코드가 [" + (currow - grd_goodwin.fixedRows + 1)+ "," + (srcrow - grd_goodwin.fixedRows + 1)+ "->" + grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")) + "] 존재하여 저장 " ,"E001");
  438. return false;
  439. }
  440. }
  441. }
  442. }
  443. }
  444. else
  445. {
  446. var winqty = 0;
  447. var delivedeptqty = 0;
  448. var stocqty = 0;
  449. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  450. {
  451. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")).length == 0)
  452. {
  453. messageBox((currow)+ " 번째 요구량을 " ,"C001");
  454. grd_goodwin.row = currow;
  455. grd_goodwin.col= grd_goodwin.colRef("winqty");
  456. grd_goodwin.editCell();
  457. return false;
  458. }
  459. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winunitcost")) == 0)
  460. {
  461. messageBox((currow)+ " 번째 단가를 " ,"C001");
  462. grd_goodwin.row = currow;
  463. grd_goodwin.col= grd_goodwin.colRef("winunitcost");
  464. grd_goodwin.editCell();
  465. return false;
  466. }
  467. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")) == 0)
  468. {
  469. messageBox((currow -1)+ " 번째 금액을 " ,"C001");
  470. grd_goodwin.row = currow;
  471. grd_goodwin.col= grd_goodwin.colRef("winamt");
  472. grd_goodwin.editCell();
  473. return false;
  474. }
  475. winqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty"));
  476. delivedeptqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("delivedeptqty"));
  477. stocqty = winqty - delivedeptqty;
  478. model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocqty" , stocqty);
  479. if(stocqty > 0)model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "Y");
  480. else model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "N");
  481. }
  482. }
  483. return true;
  484. }
  485. function fAfterRetrieve()
  486. {
  487. var winqty = 0;
  488. var winamt = 0;
  489. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  490. {
  491. winqty = winqty + parseFloat( grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")));
  492. winamt = winamt + 0 + parseFloat(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")));
  493. }
  494. model.setValue(ipt_sumwinqty.attribute("ref"),grd_goodwin.rows - grd_goodwin.fixedRows);
  495. model.setValue(opt_sumwinamt.attribute("ref"),winamt);
  496. model.setValue(ipt_winno.attribute("ref"),model.getValue("/root/main/list/goodwin/goodmaxwinno/winno"));
  497. model.refresh();
  498. }
  499. ]]>
  500. </script>
  501. </xhtml:head>
  502. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  503. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  504. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">제제약입고관리</caption>
  505. </group>
  506. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  507. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:61px; background-color:#fffbf2; border-color:#ffd799; "/>
  508. <input id="ipt_winno" ref="/root/send/goodwin/winno" class="input_default" editable="false" maxlength="4" style="left:424px; top:18px; width:34px; height:19px; ">
  509. <script type="javascript" ev:event="onkeyup">
  510. <![CDATA[
  511. inputEnterKey("btn_search", "DOMActivate");
  512. ]]>
  513. </script>
  514. </input>
  515. <select1 id="cmb_instcd" ref="/root/send/goodwin/instcd" class="combo_s_essential" appearance="minimal" style="left:100px; top:18px; width:100px; height:19px; ">
  516. <choices>
  517. <itemset nodeset="/root/init/instcd">
  518. <label ref="cdnm"/>
  519. <value ref="cdid"/>
  520. </itemset>
  521. </choices>
  522. <script type="javascript" ev:event="xforms-value-changed">
  523. <![CDATA[
  524. btn_search.dispatch("DOMActivate");
  525. ]]>
  526. </script>
  527. </select1>
  528. <select1 id="cmb_goodflag" ref="/root/send/goodwin/goodflag" class="combo_s_essential" appearance="minimal" style="left:100px; top:44px; width:100px; height:19px; ">
  529. <choices>
  530. <item>
  531. <label>약품</label>
  532. <value>P</value>
  533. </item>
  534. </choices>
  535. <script type="javascript" ev:event="xforms-value-changed">
  536. <![CDATA[
  537. btn_search.dispatch("DOMActivate");
  538. ]]>
  539. </script>
  540. </select1>
  541. <input id="ipt_windd" ref="/root/send/goodwin/windd" class="input_s_essential" inputtype="date" style="left:330px; top:18px; width:93px; height:19px; ">
  542. <script type="javascript" ev:event="xforms-value-changed">
  543. <![CDATA[
  544. btn_search.dispatch("DOMActivate");
  545. ]]>
  546. </script>
  547. </input>
  548. <input id="ipt_winpsnnm" ref="/root/send/goodwin/winpsnnm" class="input_fix" appearance="input" style="left:705px; top:44px; width:155px; height:19px; ">
  549. <script type="javascript" ev:event="xforms-value-changed">
  550. <![CDATA[
  551. if(ipt_winpsnnm.value.length == 0)
  552. ipt_winpsn.value = "";
  553. else
  554. var recv_list = "winpsn,winpsnnm";
  555. misfValidationCheck("01-2","", recv_list);
  556. model.refresh();
  557. ]]>
  558. </script>
  559. </input>
  560. <button id="btn_winpsn" class="icon_search" style="left:685px; top:46px; width:16px; height:16px; ">
  561. <caption/>
  562. <script type="javascript" ev:event="DOMActivate">
  563. <![CDATA[
  564. /*
  565. rszfOpenPopUpListByWndName(ipt_winpsn,"","delivepsn,delivepsnnm","SPZSU10100","","");
  566. var userinfo = model.getValue(gvParamPath +"/SPZSU10100_/SPZSU10100_value");
  567. if(userinfo != "" && userinfo != null) {
  568. userinfo = userinfo.split("|");
  569. model.setValue(ipt_winpsn.attribute("ref"),userinfo[0]);
  570. model.setValue(ipt_winpsnnm.attribute("ref"),userinfo[1]);
  571. }
  572. model.refresh();
  573. */
  574. var recv_list = "winpsn,winpsnnm";
  575. misfOpenPopUpList("12", ipt_winpsn,"", recv_list) ;
  576. model.refresh();
  577. btn_search.dispatch("DOMActivate");
  578. ]]>
  579. </script>
  580. </button>
  581. <input id="ipt_winpsn" ref="/root/send/goodwin/winpsn" class="input_fix" maxlength="10" appearance="input" style="left:590px; top:44px; width:90px; height:19px; ">
  582. <script type="javascript" ev:event="xforms-value-changed">
  583. <![CDATA[
  584. if(ipt_winpsn.value.length == 0)
  585. ipt_winpsnnm.value = "";
  586. else
  587. var recv_list = "winpsn,winpsnnm";
  588. misfValidationCheck("01-1","", recv_list);
  589. model.refresh();
  590. ]]>
  591. </script>
  592. </input>
  593. <button id="btn_search" navindex="7" class="btn1_letter2" style="left:1125px; top:30px; width:56px; height:22px; text-align:left; ">
  594. <caption>조회</caption>
  595. <script type="javascript" ev:event="DOMActivate">
  596. <![CDATA[
  597. if(fCheckRetrieveData(false) == false)return;
  598. if(sch_select.selectedIndex == 0)
  599. {
  600. model.setValue("/root/send/goodreq/instcd" , model.getValue(cmb_instcd.attribute("ref")));
  601. model.setValue("/root/send/goodreq/goodflag" , model.getValue(cmb_goodflag.attribute("ref")));
  602. misfGridInit(grd_goodreq);
  603. submit("TRRSD02001");
  604. }
  605. else
  606. {
  607. model.setValue("/root/send/goodwin/retrmaxwinnoyn","Y");
  608. misfGridInit(grd_goodwin);
  609. misfGridInit(grd_delive);
  610. misfMsterDetailRetrieve();
  611. fAfterRetrieve();
  612. }
  613. ]]>
  614. </script>
  615. </button>
  616. <switch id="sch_select" style="left:0px; top:96px; width:1195px; height:638px; ">
  617. <case id="cse_nonwin" style="left:0px; top:0px; width:1195px; height:700px; ">
  618. <caption id="caption23" style="left:176px; top:6px; width:15px; height:20px; font-weight:bold; vertical-align:middle; ">~</caption>
  619. <input id="ipt_reqfrdd" ref="/root/send/goodreq/reqfrdd" class="input_s_essential" inputtype="date" style="left:73px; top:4px; width:100px; height:19px; ">
  620. <script type="javascript" ev:event="xforms-value-changed">
  621. <![CDATA[
  622. btn_search.dispatch("DOMActivate");
  623. ]]>
  624. </script>
  625. </input>
  626. <input id="ipt_reqtodd" ref="/root/send/goodreq/reqtodd" class="input_s_essential" inputtype="date" style="left:190px; top:4px; width:100px; height:19px; ">
  627. <script type="javascript" ev:event="xforms-value-changed">
  628. <![CDATA[
  629. btn_search.dispatch("DOMActivate");
  630. ]]>
  631. </script>
  632. </input>
  633. <datagrid id="grd_goodreq" nodeset="/root/main/list/goodreq/goodreqlist" caption="청구일자^청구부서^청구구분^작업구분^청구순번^물품코드^물품명^규격^모델^제조회사^청구수량^청구단위^진행상태^조정수량^불출수량^조정자^미입고사유^비고^청구방법^불출구분^구매구분" colwidth="68, 89, 57, 59, 59, 84, 240, 89, 88, 73, 67, 55, 75, 60, 55, 55, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" colsep="^" tooltip="true" style="left:0px; top:30px; width:1193px; height:597px; ">
  634. <col ref="reqdd" format="yyyy-mm-dd"/>
  635. <col ref="reqdeptnm"/>
  636. <col ref="reqflag"/>
  637. <col ref="workflag"/>
  638. <col ref="reqseqno" style="text-align:center; "/>
  639. <col ref="goodcd"/>
  640. <col ref="goodnm"/>
  641. <col ref="goodspec"/>
  642. <col ref="goodmodel"/>
  643. <col ref="prodcmpynm"/>
  644. <col ref="reqqty" format="#,###" style="text-align:right; "/>
  645. <col ref="requnit"/>
  646. <col ref="deliveprcsflag"/>
  647. <col ref="adjtqty" format="#,###" style="text-align:right; "/>
  648. <col ref="deliveqty" format="#,###" style="text-align:right; "/>
  649. <col ref="adjtrsn" style="text-align:right; "/>
  650. <col ref="unwinresn"/>
  651. <col ref="cmt"/>
  652. <col ref="reqmthdflag"/>
  653. <col ref="deliveflag"/>
  654. <col ref="purcflag"/>
  655. <script type="javascript" ev:event="onaftersort">
  656. <![CDATA[
  657. grd_goodreq.gridToInstance();
  658. ]]>
  659. </script>
  660. </datagrid>
  661. <caption id="caption5" style="left:15px; top:4px; width:60px; height:20px; ">청구일자 :</caption>
  662. <line id="line2" class="line_1" style="x1:0px; y1:25px; x2:1193px; y2:25px; "/>
  663. </case>
  664. <case id="cse_win" selected="true" style="left:0px; top:0px; width:1193px; height:700; ">
  665. <datagrid id="grd_goodwin" nodeset="/root/main/list/goodwin/goodwinlist" caption="순번^발주번호^물품코드*^품명^규격^모델^제조회사^포장수량^포장수량^포장수량^입고량^입고량^단가^입고금액^출고수량^잔량^기관코드^물품구분^입고일자^입고자^입고부서^장소^계산구분^가납여부^전자계산방법^전자계산유무^입출력^부서^요구일자^요구번호^요구순번^출고번호^출고순번^보나에스코드^calcdocudd^profno^계정코드^청구일자^청구번호^청구순번^valiterm^재고유무^체크일자^체크자^체크유무^슬립일자^슬립번호^공급처코드^비고^이전입고량" colwidth="52, 0, 115, 185, 100, 100, 100, 50, 80, 60, 50, 60, 100, 100, 100" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" colsep="^" tooltip="true" style="left:0px; top:30px; width:1193px; height:267px; ">
  666. <col ref="winseqno" style="text-align:center; "/>
  667. <col ref="winno" visibility="hidden"/>
  668. <col ref="goodcd" type="inputbutton" _key="true"/>
  669. <col ref="goodnm"/>
  670. <col ref="goodspec"/>
  671. <col ref="goodmodel"/>
  672. <col ref="prodcmpynm"/>
  673. <col ref="winpackqty" type="input" format="#,###" maxlength="9" style="text-align:right; "/>
  674. <col ref="winpackunit"/>
  675. <col ref="winpackcntperunit" type="input" format="#,###" maxlength="9" style="text-align:right; "/>
  676. <col ref="winqty" format="#,###" maxlength="9" style="text-align:right; "/>
  677. <col ref="winunit"/>
  678. <col ref="winunitcost" type="input" format="#,###" maxlength="14" style="text-align:right; "/>
  679. <col ref="winamt" format="#,###" maxlength="14" style="text-align:right; "/>
  680. <col ref="delivedeptqty" format="#,###" maxlength="14" style="text-align:right; "/>
  681. <col ref="stocqty" format="#,###" maxlength="14" style="text-align:right; "/>
  682. <col ref="instcd" visibility="hidden"/>
  683. <col ref="goodflag" visibility="hidden"/>
  684. <col ref="windd" visibility="hidden"/>
  685. <col ref="winpsn" visibility="hidden"/>
  686. <col ref="windeptcd" visibility="hidden"/>
  687. <col ref="installplcecd" visibility="hidden"/>
  688. <col ref="paycond" visibility="hidden"/>
  689. <col ref="temppay" visibility="hidden"/>
  690. <col ref="calcdocukind" visibility="hidden"/>
  691. <col ref="elctstmntyn" visibility="hidden"/>
  692. <col ref="iokind" visibility="hidden"/>
  693. <col ref="suplplcecd" visibility="hidden"/>
  694. <col ref="purcdmnddd" visibility="hidden"/>
  695. <col ref="purcdmndno" visibility="hidden"/>
  696. <col ref="purcdmndseq" visibility="hidden"/>
  697. <col ref="deliveno" visibility="hidden"/>
  698. <col ref="deliveseqno" visibility="hidden"/>
  699. <col ref="bnscd" visibility="hidden"/>
  700. <col ref="calcdocudd" visibility="hidden"/>
  701. <col ref="profno" visibility="hidden"/>
  702. <col ref="acntcd" visibility="hidden"/>
  703. <col ref="reqdd" visibility="hidden"/>
  704. <col ref="reqno" visibility="hidden"/>
  705. <col ref="reqseqno" visibility="hidden"/>
  706. <col ref="valiterm" visibility="hidden"/>
  707. <col ref="stocynindx" visibility="hidden"/>
  708. <col ref="chkdd" visibility="hidden"/>
  709. <col ref="chkpsn" visibility="hidden"/>
  710. <col ref="chkyn" visibility="hidden"/>
  711. <col ref="slipdd" visibility="hidden"/>
  712. <col ref="slipno" visibility="hidden"/>
  713. <col ref="suppcustcd" visibility="hidden"/>
  714. <col ref="cmt" visibility="hidden"/>
  715. <col ref="prewinqty" visibility="hidden"/>
  716. <col ref="minexch" visibility="hidden"/>
  717. <script type="javascript" ev:event="onbuttonclick">
  718. <![CDATA[
  719. if (grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.rowStatus(grd_goodwin.row) == "1" ) {//구성물품코드를 눌렀을 경우
  720. model.removenode("/root/copynode");
  721. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  722. model.makeNode("/root/copynode");
  723. rszfOpenPopUpListByWndName(grd_goodwin,"","goodcd,goodnm","SPRSD00190","instcd,goodflag","cmb_instcd,cmb_goodflag");
  724. var cur_row = grd_goodwin.row;
  725. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  726. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  727. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  728. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  729. }
  730. ]]>
  731. </script>
  732. <script type="javascript" ev:event="onrowchanged">
  733. <![CDATA[
  734. //misfGridInit(grd_delive);
  735. misfMsterDetailRetrieve();
  736. ]]>
  737. </script>
  738. <script type="javascript" ev:event="xforms-value-changed">
  739. <![CDATA[
  740. if(grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("goodcd")).length> 0) {
  741. model.removenode("/root/copynode");
  742. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  743. model.makeNode("/root/copynode");
  744. 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");
  745. model.refresh();
  746. if( grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length> 0)
  747. {
  748. 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") );
  749. else model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit","1");
  750. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" ,model.getValue("/root/init/main/goodlist/purcunit"));
  751. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , model.getValue("/root/init/main/goodlist/purcunit"));
  752. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/suplplcecd" , model.getValue("/root/init/main/goodlist/maincustlastsuplplce"));
  753. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" ,1);
  754. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , model.getValue("/root/init/main/goodlist/goodunitcost"));
  755. }
  756. model.recalculate();
  757. model.refresh();
  758. var cur_row = grd_goodwin.row;
  759. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  760. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  761. if(CSV.length == 0 && grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length == 0)
  762. {
  763. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodcd" , "");
  764. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodnm" , "");
  765. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodspec" , "");
  766. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodmodel" , "");
  767. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/prodcmpynm" , "");
  768. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" , "");
  769. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" , "");
  770. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , "");
  771. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , "");
  772. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackcntperunit" , "");
  773. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , "");
  774. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winamt" , "");
  775. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  776. grd_goodwin.editCell();
  777. }
  778. if(CSV.length > 0)
  779. {
  780. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodcd","");
  781. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  782. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  783. }
  784. }
  785. ]]>
  786. </script>
  787. <script type="javascript" ev:event="onkeydown">
  788. <![CDATA[
  789. if(event.keyCode == 9)
  790. {
  791. if(event.shiftKey)
  792. {
  793. if(grd_goodwin.colAttribute(grd_goodwin.col + 1, "type").indexOf ("input") > -1)
  794. {
  795. for(curcol = grd_goodwin.col -1 ; curcol > -1 ; curcol--)
  796. {
  797. if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  798. {
  799. grd_goodwin.col = curcol;
  800. grd_goodwin.editCell();
  801. return;
  802. }
  803. }
  804. }
  805. }
  806. else
  807. {
  808. if(grd_goodwin.colAttribute(grd_goodwin.col, "type").indexOf ("input") == -1)
  809. {
  810. if(grd_goodwin.col - 1 == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.col - 1).length == 0)
  811. {
  812. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  813. grd_goodwin.editCell();
  814. return;
  815. }
  816. for(curcol = grd_goodwin.col ; curcol <grd_goodwin.cols ; curcol++)
  817. {
  818. if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  819. {
  820. grd_goodwin.col = curcol;
  821. grd_goodwin.editCell();
  822. return;
  823. }
  824. }
  825. }
  826. }
  827. }
  828. ]]>
  829. </script>
  830. <script type="javascript" ev:event="onaftersort">
  831. <![CDATA[
  832. grd_goodwin.gridToInstance();
  833. ]]>
  834. </script>
  835. </datagrid>
  836. <caption id="caption3" class="tit_2" style="left:4px; top:10px; width:118px; height:13px; ">입고내역</caption>
  837. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:1193px; y2:25px; "/>
  838. <button id="btn_choidel" class="btn2_letter3" style="left:1140px; top:4px; width:53px; height:19px; ">
  839. <caption>행삭제</caption>
  840. <script type="javascript" ev:event="DOMActivate">
  841. <![CDATA[
  842. misfGridIUD(grd_goodwin, "D");
  843. ]]>
  844. </script>
  845. </button>
  846. <caption id="caption4" style="left:897px; top:4px; width:58px; height:20px; vertical-align:middle; ">입고합계 :</caption>
  847. <output id="ipt_sumwinqty" ref="/root/init/winqty" class="output_default" style="left:825px; top:4px; width:70px; height:19px; font-weight:bold; "/>
  848. <caption id="caption25" style="left:767px; top:4px; width:58px; height:20px; vertical-align:middle; ">입고건수 :</caption>
  849. <output id="opt_sumwinamt" ref="/root/init/winamt" class="output_default" format="#,###" style="left:955px; top:4px; width:125px; height:19px; font-weight:bold; "/>
  850. <button id="btn_insert" class="btn2_letter3" style="left:1085px; top:4px; width:53px; height:19px; ">
  851. <caption>행추가</caption>
  852. <script type="javascript" ev:event="DOMActivate">
  853. <![CDATA[
  854. if(fCheckRetrieveData(true) == false)return;
  855. misfGridIUD(grd_goodwin, "A");
  856. grd_goodwin.row = grd_goodwin.rows -grd_goodwin.fixedRows ;
  857. fDefaultSetting(grd_goodwin.row );
  858. grd_goodwin.endEditCell();
  859. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  860. grd_goodwin.editCell();
  861. ]]>
  862. </script>
  863. </button>
  864. <button id="btn_delive" class="btn2_letter5" style="left:1118px; top:299px; width:75px; height:19px; ">
  865. <caption>출고량조정</caption>
  866. <script type="javascript" ev:event="DOMActivate">
  867. <![CDATA[
  868. fSettingSaveOutData(false);
  869. ]]>
  870. </script>
  871. </button>
  872. <datagrid id="grd_delive" nodeset="/root/main/list/goodwindelive/goodwindelivelist" caption="원료코드^원료약명^규격^구성^구성^출고량^잔량" colwidth="133, 470, 274, 64, 100, 64, 64, 64, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" colsep="^" style="left:0px; top:325px; width:1193px; height:302px; ">
  873. <col ref="goodcd"/>
  874. <col ref="goodnm"/>
  875. <col ref="goodspec"/>
  876. <col ref="consqty" format="#,###" style="text-align:right; "/>
  877. <col ref="compsgoodunit"/>
  878. <col ref="delivedeptqty" type="input" format="#,###" style="text-align:right; "/>
  879. <col ref="stocqty" format="#,###" style="text-align:right; "/>
  880. <col ref="windd" visibility="hidden"/>
  881. <col ref="winno" visibility="hidden"/>
  882. <col ref="windeptcd" visibility="hidden"/>
  883. <col ref="winseqno" visibility="hidden"/>
  884. <col ref="winpackunit" visibility="hidden"/>
  885. <col ref="deliveunit" visibility="hidden"/>
  886. <col ref="reqdeptcd" visibility="hidden"/>
  887. <col ref="adjtqty" visibility="hidden"/>
  888. <col ref="delivedeptcd" visibility="hidden"/>
  889. <col ref="deliveno" visibility="hidden"/>
  890. <col ref="delivedd" visibility="hidden"/>
  891. <col ref="deliveseqno" visibility="hidden"/>
  892. <col ref="delivepsn" visibility="hidden"/>
  893. <col ref="instcd" visibility="hidden"/>
  894. <col ref="deliveunit" visibility="hidden"/>
  895. <col ref="goodflag" visibility="hidden"/>
  896. <col ref="predelivedeptqty" visibility="hidden"/>
  897. </datagrid>
  898. <button id="btn_alldelive" class="btn2_letter4" style="left:1052px; top:299px; width:64px; height:19px; ">
  899. <caption>전체출고</caption>
  900. <script type="javascript" ev:event="DOMActivate">
  901. <![CDATA[
  902. fSettingSaveOutData(true);
  903. ]]>
  904. </script>
  905. </button>
  906. <line id="line4" class="line_1" style="x1:0px; y1:320px; x2:1193px; y2:320px; "/>
  907. </case>
  908. </switch>
  909. <button id="button2" class="btn_sw" group="tab" selected="true" style="left:124px; top:75px; width:144px; height:22px; ">
  910. <caption>입고관리</caption>
  911. <toggle case="cse_win" ev:event="DOMActivate"/>
  912. </button>
  913. <button id="button6" class="btn_sw" group="tab" selected="true" style="left:0px; top:75px; width:125px; height:22px; ">
  914. <caption>청구조회</caption>
  915. <toggle case="cse_nonwin" ev:event="DOMActivate"/>
  916. </button>
  917. <input id="ipt_windeptnm" ref="/root/send/goodwin/windeptnm" class="input_fix" appearance="input" style="left:705px; top:18px; width:155px; height:19px; ">
  918. <script type="javascript" ev:event="xforms-value-changed">
  919. <![CDATA[
  920. if(ipt_windeptnm.value.length == 0)
  921. ipt_windeptcd.value = "";
  922. else
  923. rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptnm",
  924. "deptnm," + ipt_windeptnm.value, "", "windeptcd,windeptnm",
  925. ipt_windeptnm, "SPRPZ00200", "","");
  926. model.refresh();
  927. ]]>
  928. </script>
  929. </input>
  930. <input id="ipt_windeptcd" ref="/root/send/goodwin/windeptcd" class="input_fix" maxlength="10" appearance="input" style="left:590px; top:18px; width:90px; height:19px; ">
  931. <script type="javascript" ev:event="xforms-value-changed">
  932. <![CDATA[
  933. if(ipt_windeptcd.value.length == 0)
  934. ipt_windeptnm.value = "";
  935. else
  936. rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptcd",
  937. "deptcd," + ipt_windeptcd.value, "", "windeptcd,windeptnm",
  938. ipt_windeptcd, "SPRPZ00200", "","");
  939. model.refresh();
  940. btn_search.dispatch("DOMActivate");
  941. ]]>
  942. </script>
  943. </input>
  944. <button id="btn_windeptcd" class="icon_search" style="left:685px; top:20px; width:16px; height:16px; ">
  945. <caption/>
  946. <script type="javascript" ev:event="DOMActivate">
  947. <![CDATA[
  948. var recv_list = "windeptcd,windeptnm";
  949. misfOpenPopUpList("02", ipt_windeptcd,"", recv_list) ;
  950. model.refresh();
  951. btn_search.dispatch("DOMActivate");
  952. ]]>
  953. </script>
  954. </button>
  955. <line id="line6" class="line_4" style="x1:1110px; y1:18px; x2:1110px; y2:61px; border-color:#ffe4bb; border-left-style:solid; "/>
  956. <caption id="caption8" class="search_name" style="left:15px; top:45px; width:86px; height:17px; ">물품구분 :</caption>
  957. <caption id="caption11" class="search_name" style="left:15px; top:19px; width:86px; height:17px; ">기관코드 :</caption>
  958. <caption id="caption12" class="search_name" style="left:245px; top:19px; width:86px; height:17px; ">입고일자 :</caption>
  959. <caption id="caption13" class="search_name" style="left:492px; top:45px; width:102px; height:17px; ">입고담당자 :</caption>
  960. <caption id="caption14" class="search_name" style="left:505px; top:19px; width:86px; height:17px; ">입고부서 :</caption>
  961. </group>
  962. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  963. <button id="btn_print" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  964. <caption>출력</caption>
  965. </button>
  966. <button id="btn_save" class="btn4_letter2" style="left:1069px; top:3px; width:56px; height:22px; ">
  967. <caption>저장</caption>
  968. <script type="javascript" ev:event="DOMActivate">
  969. <![CDATA[
  970. if(fCheckSaveData() == false)return;
  971. misfSave("TXRSI00101");
  972. if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
  973. ]]>
  974. </script>
  975. </button>
  976. <button id="btn_init" class="btn4_letter3" style="left:1126px; top:3px; width:68px; height:22px; ">
  977. <caption>초기화</caption>
  978. <script type="javascript" ev:event="DOMActivate">
  979. <![CDATA[
  980. fInitialize();
  981. ]]>
  982. </script>
  983. </button>
  984. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  985. </group>
  986. </xhtml:body>
  987. </xhtml:html>