SMRSI00100_입고관리.xrw 78 KB

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