SMRSI02300_기타입고관리(약국).xrw 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  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. </list>
  16. </main>
  17. <init>
  18. <winqty/>
  19. <winamt/>
  20. </init>
  21. <send>
  22. <goodwin>
  23. <instcd/>
  24. <goodflag/>
  25. <winpsn/>
  26. <winpsnnm/>
  27. <windeptcd/>
  28. <windeptnm/>
  29. <suplplcecd/>
  30. <suplplcenm/>
  31. <windd/>
  32. <winno/>
  33. <iokind/>
  34. <retrmaxwinnoyn/>
  35. </goodwin>
  36. <save>
  37. <goodwinlist/>
  38. <interfacecustcdlist>
  39. <purc_main_suplplcecd/>
  40. <drg_main_suplplcecd/>
  41. </interfacecustcdlist>
  42. </save>
  43. </send>
  44. </root>
  45. </instance>
  46. <script type="javascript" ev:event="xforms-ready">
  47. <![CDATA[
  48. //화면 Control을 초기화한다
  49. fInitialize();
  50. ]]>
  51. </script>
  52. <submission id="TRRSI00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodwin"/>
  53. <submission id="TXRSI00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/hidden/temp">"</submission>
  54. <bind id="bind_reqpack" ref="/root/main/list/goodwin/goodwinlist/reqpackconcat" calculate="concat(../winpackcntperunit , ' ', ../winunit, '/', ../winpackunit)" type="xsd:string"/>
  55. </model>
  56. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  59. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  60. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  62. <script type="javascript">
  63. <![CDATA[
  64. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  65. function fInitialize() {
  66. rszfUserGoodFlagList(cmb_goodflag,getUserInfo("userid"));
  67. // rszfUserInstList(cmb_instcd,getUserInfo("userid"));
  68. //misfComboComCdListMulti("Z0007,R0025","cmb_instcd,cmb_goodflag");
  69. rszfGetPurcIOFlagList(cmb_iokindcd, model.getValue(ipt_instcd.attribute("ref")) , "I","N","","","E");
  70. //if(cmb_iokindcd.length> 0) cmb_iokindcd.selectedindex= 0;
  71. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  72. rszfComboStockArthDeptcdList(cmb_windeptcd,getUserInfo("dutplceinstcd"),"PH" );
  73. misfGridInit(grd_goodwin);
  74. misfMsterDetailSet(grd_goodwin,null, "TRRSI00401" ,"Y");
  75. model.setValue(ipt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  76. model.setValue(ipt_winpsn.attribute("ref") , getUserInfo("userid"));
  77. model.setValue(opt_winpsnnm.attribute("ref") , getUserInfo("usernm"));
  78. model.setValue(ipt_windd.attribute("ref") , getCurrentDate());
  79. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  80. model.setValue(cmb_goodflag.attribute("ref") , 'PH');
  81. model.refresh();
  82. }
  83. function fAfterRetrieve()
  84. {
  85. var winqty = 0;
  86. var winamt = 0;
  87. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  88. {
  89. winqty = winqty + parseFloat( grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")));
  90. winamt = winamt + 0 + parseFloat(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")));
  91. }
  92. model.setValue(ipt_sumwinqty.attribute("ref"),grd_goodwin.rows - grd_goodwin.fixedRows);
  93. model.setValue(opt_sumwinamt.attribute("ref"),winamt);
  94. model.setValue(ipt_winno.attribute("ref"),model.getValue("/root/main/list/goodwin/goodmaxwinno/winno"));
  95. model.refresh();
  96. }
  97. function fSettingGoodList(pnode, nodename, userqtynm){
  98. var codynode = instance1.selectNodes(pnode + "/*");
  99. var addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
  100. if(model.getValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
  101. for (var j = 1; j <= codynode.length ; j++) {
  102. if(addRow > grd_goodwin.rows - grd_goodwin.fixedRows)
  103. {
  104. misfGridIUD(grd_goodwin,"A");
  105. addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
  106. fDefaultSetting(addRow );
  107. }
  108. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd"));
  109. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm"));
  110. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec"));
  111. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel"));
  112. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm"));
  113. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/" + userqtynm));
  114. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
  115. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/deliveunit"));
  116. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/" + userqtynm));
  117. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/suplplcecd", model.getValue(pnode +"/" + nodename + "[" + j + "]/maincustlastsuplplce"));
  118. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/suppcustcd", model.getValue(pnode +"/" + nodename + "[" + j + "]/suppcustcd"));
  119. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/oldcd", model.getValue(pnode +"/" + nodename + "[" + j + "]/oldcd"));
  120. if(model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty") != "0" && model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty").length>0)
  121. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty"));
  122. else
  123. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" ,"1");
  124. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunitcost" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodunitcost"));
  125. model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winqty" , parseInt(model.getValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackqty")) * parseInt( model.getValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" )));
  126. fCalcAmt();
  127. addRow = addRow + 1;
  128. }
  129. model.refresh();
  130. }
  131. function fDefaultSetting(prow)
  132. {
  133. var grd_setting=grd_goodwin;
  134. model.setValue(grd_setting.nodeset+"["+prow+"]/instcd",model.getValue("/root/send/goodwin/instcd"));
  135. model.setValue(grd_setting.nodeset+"["+prow+"]/goodflag",model.getValue("/root/send/goodwin/goodflag"));
  136. model.setValue(grd_setting.nodeset+"["+prow+"]/winno",model.getValue("/root/send/goodwin/winno"));
  137. model.setValue(grd_setting.nodeset+"["+prow+"]/windd",model.getValue("/root/send/goodwin/windd"));
  138. model.setValue(grd_setting.nodeset+"["+prow+"]/winpsn",model.getValue("/root/send/goodwin/winpsn"));
  139. model.setValue(grd_setting.nodeset+"["+prow+"]/windeptcd",model.getValue("/root/send/goodwin/windeptcd"));
  140. model.setValue(grd_setting.nodeset+"["+prow+"]/suplplcecd",model.getValue("/root/send/goodwin/suplplcecd"));
  141. model.setValue(grd_setting.nodeset+"["+prow+"]/suplplcecd",model.getValue("/root/send/goodwin/suplplcecd"));
  142. model.setValue(grd_setting.nodeset+"["+prow+"]/iokind",model.getValue(cmb_iokindcd.attribute("ref")));
  143. model.setValue(grd_setting.nodeset+"["+prow+"]/winseqno",fGetMaxWinSeqNo());
  144. model.setValue(grd_setting.nodeset+"["+prow+"]/delivedeptqty",0);
  145. model.setValue(grd_setting.nodeset+"["+prow+"]/deliveno",0);
  146. model.setValue(grd_setting.nodeset+"["+prow+"]/stocqty",0);
  147. }
  148. function fGetMaxWinSeqNo()
  149. {
  150. var maxwinseqno = "";
  151. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows; currow++)
  152. {
  153. if(maxwinseqno < grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winseqno")))
  154. maxwinseqno = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winseqno"));
  155. }
  156. if(maxwinseqno.length == 0)maxwinseqno = "001";
  157. else maxwinseqno = parseInt(maxwinseqno) + 1;
  158. maxwinseqno = "" + maxwinseqno;
  159. return maxwinseqno.getLeftPad(3,"0");
  160. }
  161. function fCheckSaveData()
  162. {
  163. if(model.getValue(ipt_instcd.attribute("ref")).length== 0 )
  164. {
  165. messageBox("기관코드를 " ,"C002");
  166. model.setFocus("ipt_instcd");
  167. return false;
  168. }
  169. if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
  170. {
  171. messageBox("물품구분을 " ,"C002");
  172. model.setFocus("cmb_goodflag");
  173. return false;
  174. }
  175. if(model.getValue(ipt_windd.attribute("ref")).length== 0 )
  176. {
  177. messageBox("입고일자를 " ,"C001");
  178. model.setFocus("ipt_windd");
  179. return false;
  180. }
  181. if(model.getValue(ipt_winpsn.attribute("ref")).length== 0 )
  182. {
  183. messageBox("입고담당자를 " ,"C001");
  184. model.setFocus("ipt_winpsn");
  185. return false;
  186. }
  187. if(model.getValue(cmb_windeptcd.attribute("ref")).length== 0 )
  188. {
  189. messageBox("입고부서를 " ,"C001");
  190. model.setFocus("cmb_windeptcd");
  191. return false;
  192. }
  193. var winqty = 0;
  194. var delivedeptqty = 0;
  195. var stocqty = 0;
  196. for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
  197. {
  198. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")).length == 0)
  199. {
  200. messageBox(currow + " 번째 물품코드를 " ,"C001");
  201. grd_goodwin.row = currow;
  202. grd_goodwin.col= grd_goodwin.colRef("goodcd");
  203. grd_goodwin.editCell();
  204. return false;
  205. }
  206. else
  207. {
  208. for(srcrow = currow + 1 ; srcrow < grd_goodwin.rows ; srcrow++)
  209. {
  210. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")) == grd_goodwin.valueMatrix(srcrow , grd_goodwin.colRef("goodcd")))
  211. {
  212. messageBox("동일 물품코드가 [" + (currow - grd_goodwin.fixedRows + 1)+ "," + (srcrow - grd_goodwin.fixedRows + 1)+ "->" + grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")) + "] 존재하여 저장 " ,"E001");
  213. return false;
  214. }
  215. }
  216. }
  217. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")).length == 0)
  218. {
  219. messageBox((currow)+ " 번째 요구량을 " ,"C001");
  220. grd_goodwin.row = currow;
  221. grd_goodwin.col= grd_goodwin.colRef("winqty");
  222. grd_goodwin.editCell();
  223. return false;
  224. }
  225. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winunitcost")) == 0)
  226. {
  227. messageBox((currow)+ " 번째 단가를 " ,"C001");
  228. grd_goodwin.row = currow;
  229. grd_goodwin.col= grd_goodwin.colRef("winunitcost");
  230. grd_goodwin.editCell();
  231. return false;
  232. }
  233. if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")) == 0)
  234. {
  235. messageBox((currow -1)+ " 번째 금액을 " ,"C001");
  236. grd_goodwin.row = currow;
  237. grd_goodwin.col= grd_goodwin.colRef("winamt");
  238. grd_goodwin.editCell();
  239. return false;
  240. }
  241. winqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty"));
  242. delivedeptqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("delivedeptqty"));
  243. stocqty = winqty - delivedeptqty;
  244. model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocqty" , stocqty);
  245. if(stocqty > 0)model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "Y");
  246. else model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "N");
  247. }
  248. return true;
  249. }
  250. function fCheckRetrieveData(pmsg)
  251. {
  252. if(model.getValue(ipt_instcd.attribute("ref")).length== 0 )
  253. {
  254. if(pmsg == true)
  255. {
  256. messageBox("기관코드를 " ,"C002");
  257. model.setFocus("ipt_instcd");
  258. }
  259. return false;
  260. }
  261. if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
  262. {
  263. if(pmsg == true)
  264. {
  265. messageBox("물품구분을 " ,"C002");
  266. model.setFocus("cmb_goodflag");
  267. }
  268. return false;
  269. }
  270. if(model.getValue(ipt_windd.attribute("ref")).length== 0 )
  271. {
  272. if(pmsg == true)
  273. {
  274. messageBox("입고일자를 " ,"C001");
  275. model.setFocus("ipt_windd");
  276. }
  277. return false;
  278. }
  279. if(model.getValue(ipt_winpsn.attribute("ref")).length== 0 )
  280. {
  281. if(pmsg == true)
  282. {
  283. messageBox("입고담당자를 " ,"C001");
  284. model.setFocus("ipt_winpsn");
  285. }
  286. return false;
  287. }
  288. if(model.getValue(cmb_windeptcd.attribute("ref")).length== 0 )
  289. {
  290. if(pmsg == true)
  291. {
  292. messageBox("입고부서를 " ,"C001");
  293. model.setFocus("cmb_windeptcd");
  294. }
  295. return false;
  296. }
  297. /*
  298. if(pmsg == true)
  299. {
  300. if(model.getValue(ipt_maincustlastsuplplce.attribute("ref")).length== 0 )
  301. {
  302. messageBox("공급처를 " ,"C001");
  303. model.setFocus("ipt_maincustlastsuplplce");
  304. return false;
  305. }
  306. }
  307. */
  308. return true;
  309. }
  310. function fCalcAmt()
  311. {
  312. var pwinqty = grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("winqty"));
  313. var pwinpackcntperunit = grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("winpackcntperunit"));
  314. var pwinunitcost = grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("winunitcost"));
  315. var pwinpackqty = parseInt(pwinqty) / parseInt(pwinpackcntperunit);
  316. var pwinamt = parseInt(pwinqty) * parseInt(pwinunitcost) ;
  317. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" ,pwinpackqty);
  318. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winamt" ,pwinamt);
  319. }
  320. ]]>
  321. </script>
  322. </xhtml:head>
  323. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  324. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  325. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">약품 기타 입고관리</caption>
  326. </group>
  327. <group id="grp_biz" scroll="auto" style="left:0px; top:38; width:1195; height:744px; ">
  328. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:61px; background-color:#fffbf2; border-color:#ffd799; "/>
  329. <line id="line1" class="line_1" style="x1:0px; y1:95px; x2:1195px; y2:95px; "/>
  330. <datagrid id="grd_goodwin" nodeset="/root/main/list/goodwin/goodwinlist" caption="순번^약품코드*^구코드^약품명^함량^포장수량^낱개수량^포장^포장^포장^포장^모델^제조회사^단가^입고금액" colsep="^" colwidth="42, 103, 82, 240, 167, 75, 75, 100, 70, 70, 70, 0, 0, 85, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:100px; width:1195px; height:640px; ">
  331. <col ref="winseqno" style="text-align:center; "/>
  332. <col imemode="disabled" ref="goodcd" type="inputbutton" _chartype="upper" _key="true"/>
  333. <col ref="oldcd" type="input" _chartype="upper"/>
  334. <col ref="goodnm" type="input"/>
  335. <col ref="goodspec"/>
  336. <col ref="winpackqty" format="#,###.#" maxlength="9" style="text-align:right; "/>
  337. <col ref="winqty" type="input" format="(-)#,###" maxlength="9" style="text-align:right; "/>
  338. <col ref="reqpackconcat"/>
  339. <col ref="winpackcntperunit" visibility="hidden" style="text-align:right; "/>
  340. <col ref="winunit" visibility="hidden"/>
  341. <col ref="winpackunit" visibility="hidden"/>
  342. <col ref="goodmodel" visibility="hidden"/>
  343. <col ref="prodcmpynm" visibility="hidden"/>
  344. <col ref="winunitcost" type="input" format="#,###" maxlength="14" style="text-align:right; "/>
  345. <col ref="winamt" format="(-)#,###" maxlength="14" style="text-align:right; "/>
  346. <col ref="winno" visibility="hidden"/>
  347. <col ref="delivedeptqty" visibility="hidden"/>
  348. <col ref="stocqty" visibility="hidden"/>
  349. <col ref="instcd" visibility="hidden"/>
  350. <col ref="goodflag" visibility="hidden"/>
  351. <col ref="windd" visibility="hidden"/>
  352. <col ref="winpsn" visibility="hidden"/>
  353. <col ref="windeptcd" visibility="hidden"/>
  354. <col ref="installplcecd" visibility="hidden"/>
  355. <col ref="paycond" visibility="hidden"/>
  356. <col ref="temppay" visibility="hidden"/>
  357. <col ref="calcdocukind" visibility="hidden"/>
  358. <col ref="elctstmntyn" visibility="hidden"/>
  359. <col ref="iokind" visibility="hidden"/>
  360. <col ref="suplplcecd" visibility="hidden"/>
  361. <col ref="purcdmnddd" visibility="hidden"/>
  362. <col ref="purcdmndno" visibility="hidden"/>
  363. <col ref="purcdmndseq" visibility="hidden"/>
  364. <col ref="deliveno" visibility="hidden"/>
  365. <col ref="deliveseqno" visibility="hidden"/>
  366. <col ref="bnscd" visibility="hidden"/>
  367. <col ref="calcdocudd" visibility="hidden"/>
  368. <col ref="profno" visibility="hidden"/>
  369. <col ref="acntcd" visibility="hidden"/>
  370. <col ref="reqdd" visibility="hidden"/>
  371. <col ref="reqno" visibility="hidden"/>
  372. <col ref="reqseqno" visibility="hidden"/>
  373. <col ref="valiterm" visibility="hidden"/>
  374. <col ref="stocynindx" visibility="hidden"/>
  375. <col ref="chkdd" visibility="hidden"/>
  376. <col ref="chkpsn" visibility="hidden"/>
  377. <col ref="chkyn" visibility="hidden"/>
  378. <col ref="slipdd" visibility="hidden"/>
  379. <col ref="slipno" visibility="hidden"/>
  380. <col ref="suppcustcd" visibility="hidden"/>
  381. <col ref="cmt" visibility="hidden"/>
  382. <col ref="prewinqty" visibility="hidden"/>
  383. <col ref="minexch" visibility="hidden"/>
  384. <script type="javascript" ev:event="onbuttonclick">
  385. <![CDATA[
  386. if (grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.rowStatus(grd_goodwin.row) == "1" ) {//구성물품코드를 눌렀을 경우
  387. model.removenode("/root/copynode");
  388. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  389. model.makeNode("/root/copynode");
  390. rszfOpenPopUpListByWndName(grd_goodwin,"","goodcd,goodnm","SPRSD00190","instcd,goodflag","ipt_instcd,cmb_goodflag");
  391. var cur_row = grd_goodwin.row;
  392. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  393. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  394. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  395. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  396. }
  397. ]]>
  398. </script>
  399. <script type="javascript" ev:event="xforms-value-changed">
  400. <![CDATA[
  401. if(grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("goodcd")).length> 0) {
  402. model.removenode("/root/copynode");
  403. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  404. model.makeNode("/root/copynode");
  405. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodcd," + model.getValue(ipt_instcd.attribute("ref")) + "," +model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag") + "," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodcd") + ",,,," ,"","goodcd,goodnm,goodspec,goodmodel,prodcmpynm,exchqty,goodunitcost,oldcd",grd_goodwin,"SPRSD00190","instcd,goodflag","ipt_instcd," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag"),"Y");
  406. model.refresh();
  407. if( grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("goodnm")).length> 0)
  408. {
  409. 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") );
  410. else model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit","1");
  411. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" ,model.getValue("/root/init/main/goodlist/purcunit"));
  412. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , model.getValue("/root/init/main/goodlist/deliveunit"));
  413. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" ,1);
  414. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , model.getValue("/root/init/main/goodlist/goodunitcost"));
  415. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/suplplcecd" , model.getValue("/root/init/main/goodlist/maincustlastsuplplce"));
  416. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/suppcustcd" , model.getValue("/root/init/main/goodlist/suppcustcd"));
  417. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/oldcd" , model.getValue("/root/init/main/goodlist/oldcd"));
  418. //model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" ,model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackqty"));
  419. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , parseInt(model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty")) * parseInt( model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit")));
  420. fCalcAmt();
  421. }
  422. model.refresh();
  423. var cur_row = grd_goodwin.row;
  424. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  425. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  426. if(CSV.length == 0 && grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length == 0)
  427. {
  428. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodcd" , "");
  429. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodnm" , "");
  430. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodspec" , "");
  431. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodmodel" , "");
  432. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/prodcmpynm" , "");
  433. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" , "");
  434. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" , "");
  435. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , "");
  436. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , "");
  437. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackcntperunit" , "");
  438. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , "");
  439. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winamt" , "");
  440. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/oldcd" , "");
  441. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  442. grd_goodwin.editCell();
  443. }
  444. if(CSV.length > 0)
  445. {
  446. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodcd","");
  447. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  448. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  449. }
  450. }
  451. else if(grd_goodwin.col == grd_goodwin.colRef("goodnm") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("goodnm")).length> 0)
  452. {//goodnm
  453. model.removenode("/root/copynode");
  454. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  455. model.makeNode("/root/copynode");
  456. //rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodnm," + model.getValue(ipt_instcd.attribute("ref")) + "," +model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag") + ",," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodnm")+",,," ,"","goodcd,goodnm,goodspec,goodmodel,prodcmpynm,exchqty,goodunitcost,oldcd",grd_goodwin,"SPRSD00190","instcd,goodflag","ipt_instcd," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag"),"Y");
  457. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodnm," + model.getValue(ipt_instcd.attribute("ref")) + "," +model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag") + ",," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodnm")+",,," ,"","goodcd,goodnm,goodspec,goodmodel,prodcmpynm,exchqty,goodunitcost,oldcd",grd_goodwin,"SPRSD00190","instcd,goodflag,goodnm","ipt_instcd," + 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)+ "]/goodnm"),"Y");
  458. model.refresh();
  459. if( grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("goodnm")).length> 0)
  460. {
  461. 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") );
  462. else model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit","1");
  463. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" ,model.getValue("/root/init/main/goodlist/purcunit"));
  464. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , model.getValue("/root/init/main/goodlist/deliveunit"));
  465. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" ,1);
  466. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , model.getValue("/root/init/main/goodlist/goodunitcost"));
  467. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/suplplcecd" , model.getValue("/root/init/main/goodlist/maincustlastsuplplce"));
  468. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/suppcustcd" , model.getValue("/root/init/main/goodlist/suppcustcd"));
  469. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/oldcd" , model.getValue("/root/init/main/goodlist/oldcd"));
  470. //model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" ,model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackqty"));
  471. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , parseInt(model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty")) * parseInt( model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit")));
  472. fCalcAmt();
  473. }
  474. model.refresh();
  475. var cur_row = grd_goodwin.row;
  476. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  477. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  478. if(CSV.length == 0 && grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length == 0)
  479. {
  480. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodcd" , "");
  481. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodnm" , "");
  482. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodspec" , "");
  483. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodmodel" , "");
  484. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/prodcmpynm" , "");
  485. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" , "");
  486. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" , "");
  487. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , "");
  488. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , "");
  489. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackcntperunit" , "");
  490. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , "");
  491. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winamt" , "");
  492. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/oldcd" , "");
  493. grd_goodwin.col = grd_goodwin.colRef("goodnm");
  494. grd_goodwin.editCell();
  495. }
  496. if(CSV.length > 0)
  497. {
  498. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodnm","");
  499. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  500. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  501. }
  502. }
  503. else if(grd_goodwin.col == grd_goodwin.colRef("oldcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("oldcd")).length> 0)
  504. {//oldcd
  505. model.removenode("/root/copynode");
  506. model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  507. model.makeNode("/root/copynode");
  508. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,oldcd,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodnm," +model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/oldcd") + "," + model.getValue(ipt_instcd.attribute("ref")) + "," +model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag") + ",,,,," ,"","goodcd,goodnm,goodspec,goodmodel,prodcmpynm,exchqty,goodunitcost,oldcd",grd_goodwin,"SPRSD00190","instcd,goodflag","ipt_instcd," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag"),"Y");
  509. model.refresh();
  510. if( grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("oldcd")).length> 0)
  511. {
  512. 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") );
  513. else model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit","1");
  514. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" ,model.getValue("/root/init/main/goodlist/purcunit"));
  515. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , model.getValue("/root/init/main/goodlist/deliveunit"));
  516. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" ,1);
  517. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , model.getValue("/root/init/main/goodlist/goodunitcost"));
  518. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/suplplcecd" , model.getValue("/root/init/main/goodlist/maincustlastsuplplce"));
  519. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/suppcustcd" , model.getValue("/root/init/main/goodlist/suppcustcd"));
  520. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/oldcd" , model.getValue("/root/init/main/goodlist/oldcd"));
  521. //model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" ,model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackqty"));
  522. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , parseInt(model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty")) * parseInt( model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit")));
  523. fCalcAmt();
  524. }
  525. model.refresh();
  526. var cur_row = grd_goodwin.row;
  527. var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
  528. var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
  529. if(CSV.length == 0 && grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("oldcd")).length == 0)
  530. {
  531. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodcd" , "");
  532. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodnm" , "");
  533. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodspec" , "");
  534. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodmodel" , "");
  535. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/prodcmpynm" , "");
  536. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" , "");
  537. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" , "");
  538. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , "");
  539. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , "");
  540. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackcntperunit" , "");
  541. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , "");
  542. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winamt" , "");
  543. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/oldcd" , "");
  544. grd_goodwin.col = grd_goodwin.colRef("oldcd");
  545. grd_goodwin.editCell();
  546. }
  547. if(CSV.length > 0)
  548. {
  549. model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/oldcd","");
  550. setCSVToNode("/root/copynode", CSV, "goodwinlist");
  551. fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
  552. }
  553. }
  554. else if(grd_goodwin.col == grd_goodwin.colRef("winqty") )
  555. {
  556. fCalcAmt();
  557. }
  558. else if(grd_goodwin.col == grd_goodwin.colRef("winunitcost") )
  559. {
  560. fCalcAmt();
  561. }
  562. ]]>
  563. </script>
  564. <script type="javascript" ev:event="onkeydown">
  565. <![CDATA[
  566. if(event.keyCode == 9)
  567. {
  568. if(event.shiftKey)
  569. {
  570. if(grd_goodwin.colAttribute(grd_goodwin.col + 1, "type").indexOf ("input") > -1)
  571. {
  572. for(curcol = grd_goodwin.col -1 ; curcol > -1 ; curcol--)
  573. {
  574. if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  575. {
  576. grd_goodwin.col = curcol;
  577. grd_goodwin.editCell();
  578. return;
  579. }
  580. }
  581. }
  582. }
  583. else
  584. {
  585. if(grd_goodwin.colAttribute(grd_goodwin.col, "type").indexOf ("input") == -1)
  586. {
  587. if(grd_goodwin.col - 1 == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.col - 1).length == 0)
  588. {
  589. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  590. grd_goodwin.editCell();
  591. return;
  592. }
  593. for(curcol = grd_goodwin.col ; curcol <grd_goodwin.cols ; curcol++)
  594. {
  595. if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
  596. {
  597. grd_goodwin.col = curcol;
  598. grd_goodwin.editCell();
  599. return;
  600. }
  601. }
  602. }
  603. }
  604. }else if(event.keyCode == 13)
  605. {
  606. if(grd_goodwin.fixedRows <= grd_goodwin.row)
  607. {
  608. if( grd_goodwin.col == grd_goodwin.colRef("winqty") )
  609. {
  610. if(grd_goodwin.row == (grd_goodwin.rows-grd_goodwin.fixedRows) )
  611. {
  612. if( grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("oldcd")) != "")
  613. {
  614. btn_insert.dispatch("DOMActivate");
  615. grd_goodwin.endEditCell();
  616. grd_goodwin.col = grd_goodwin.colRef("oldcd");
  617. grd_goodwin.editCell();
  618. }else{
  619. grd_goodwin.endEditCell();
  620. grd_goodwin.col = grd_goodwin.colRef("winqty");
  621. grd_goodwin.editCell();
  622. }
  623. }else{
  624. grd_goodwin.endEditCell();
  625. grd_goodwin.row = grd_goodwin.row + 1 ;
  626. grd_goodwin.col = grd_goodwin.colRef("oldcd");
  627. grd_goodwin.editCell();
  628. }
  629. }
  630. else if( grd_goodwin.col == grd_goodwin.colRef("oldcd") )
  631. {
  632. if( grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("oldcd")) != "")
  633. {
  634. grd_goodwin.endEditCell();
  635. grd_goodwin.col = grd_goodwin.colRef("winqty");
  636. grd_goodwin.editCell();
  637. }
  638. }
  639. else
  640. {
  641. grd_goodwin.endEditCell();
  642. grd_goodwin.col = grd_goodwin.colRef("oldcd");
  643. grd_goodwin.editCell();
  644. }
  645. }
  646. }
  647. ]]>
  648. </script>
  649. </datagrid>
  650. <caption id="caption3" class="tit_2" style="left:5px; top:80px; width:118px; height:13px; ">입고내역</caption>
  651. <input id="ipt_winno" ref="/root/send/goodwin/winno" class="input_essential" disabled="true" editable="false" style="left:208px; top:19px; width:37px; height:19px; "/>
  652. <output id="ipt_sumwinqty" ref="/root/init/winqty" class="output_default" format="#,###" style="left:821px; top:75px; width:64px; height:19px; text-align:right; "/>
  653. <caption id="caption25" style="left:756px; top:75px; width:73px; height:20px; font-weight:bold; vertical-align:middle; ">입고건수 :</caption>
  654. <output id="opt_sumwinamt" ref="/root/init/winamt" class="output_default" format="#,###" style="left:959px; top:75px; width:117px; height:19px; text-align:right; "/>
  655. <caption id="caption4" style="left:894px; top:75px; width:73px; height:20px; font-weight:bold; vertical-align:middle; ">입고합계 :</caption>
  656. <input id="ipt_windd" ref="/root/send/goodwin/windd" class="input_s_essential" inputtype="date" style="left:100px; top:19px; width:106px; height:19px; ">
  657. <script type="javascript" ev:event="xforms-value-changed">
  658. <![CDATA[
  659. btn_search.dispatch("DOMActivate");
  660. ]]>
  661. </script>
  662. </input>
  663. <select1 id="cmb_iokindcd" ref="/root/send/goodwin/iokind" class="combo_s_essential" appearance="minimal" style="left:390px; top:19px; width:106px; height:19px; ">
  664. <choices>
  665. <itemset nodeset="/root/init/ioflag">
  666. <label ref="cdnm"/>
  667. <value ref="cdid"/>
  668. </itemset>
  669. </choices>
  670. <script type="javascript" ev:event="xforms-value-changed">
  671. <![CDATA[
  672. btn_search.dispatch("DOMActivate");
  673. ]]>
  674. </script>
  675. </select1>
  676. <output id="opt_winpsnnm" ref="/root/send/goodwin/winpsnnm" class="output_fix" appearance="output" style="left:618px; top:19px; width:110px; height:19px; "/>
  677. <input id="ipt_winpsn" ref="/root/send/goodwin/winpsn" class="input_essential" visibility="hidden" maxlength="10" appearance="input" style="left:1015px; top:15px; width:30px; height:19px; "/>
  678. <select1 id="cmb_goodflag" ref="/root/send/goodwin/goodflag" class="combo_s_essential" visibility="hidden" appearance="minimal" style="left:1015px; top:15px; width:37px; height:19px; ">
  679. <choices>
  680. <itemset nodeset="/root/init/goodflag">
  681. <label ref="cdnm"/>
  682. <value ref="cdid"/>
  683. </itemset>
  684. </choices>
  685. <script type="javascript" ev:event="xforms-value-changed">
  686. <![CDATA[
  687. btn_search.dispatch("DOMActivate");
  688. ]]>
  689. </script>
  690. </select1>
  691. <input id="ipt_maincustlastsuplplcenm" ref="/root/send/goodwin/suplplcenm" class="input_fix" appearance="input" style="left:495px; top:44px; width:233px; height:19px; ">
  692. <script type="javascript" ev:event="xforms-value-changed">
  693. <![CDATA[
  694. if(ipt_maincustlastsuplplcenm.value.length == 0)
  695. ipt_maincustlastsuplplce.value = "";
  696. else
  697. rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm",
  698. model.getValue(ipt_instcd.attribute("ref")) +",," + model.getValue(ipt_maincustlastsuplplcenm.attribute("ref")),"","suplplcecd,suplplcenm" ,
  699. ipt_maincustlastsuplplcenm,"SPRSD00220","instcd","ipt_instcd");
  700. model.refresh();
  701. ]]>
  702. </script>
  703. </input>
  704. <input id="ipt_maincustlastsuplplce" ref="/root/send/goodwin/suplplcecd" class="input_default" style="left:390px; top:44px; width:80px; height:19px; ">
  705. <script type="javascript" ev:event="xforms-value-changed">
  706. <![CDATA[
  707. if(ipt_maincustlastsuplplce.value.length == 0)
  708. ipt_maincustlastsuplplcenm.value = "";
  709. else
  710. rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm", model.getValue(ipt_instcd.attribute("ref")) +",," + model.getValue(ipt_maincustlastsuplplce.attribute("ref")),"","suplplcecd,suplplcenm" ,ipt_maincustlastsuplplce,"SPRSD00220","instcd","ipt_instcd");
  711. model.refresh();
  712. btn_search.dispatch("DOMActivate");
  713. ]]>
  714. </script>
  715. </input>
  716. <button id="btn_maincustlastsuplplce" class="icon_search" style="left:475px; top:45px; width:16px; height:16px; ">
  717. <caption/>
  718. <script type="javascript" ev:event="DOMActivate">
  719. <![CDATA[
  720. rszfOpenPopUpListByWndName(ipt_maincustlastsuplplce,"","suplplcecd,suplplcenm","SPRSD00220","instcd","ipt_instcd");
  721. model.refresh();
  722. ]]>
  723. </script>
  724. </button>
  725. <button id="btn_choidel" class="btn2_letter3" style="left:1142px; top:74px; width:53px; height:19px; ">
  726. <caption>행삭제</caption>
  727. <script type="javascript" ev:event="DOMActivate">
  728. <![CDATA[
  729. misfGridIUD(grd_goodwin, "D");
  730. ]]>
  731. </script>
  732. </button>
  733. <button id="btn_insert" class="btn2_letter3" style="left:1087px; top:74px; width:53px; height:19px; ">
  734. <caption>행추가</caption>
  735. <script type="javascript" ev:event="DOMActivate">
  736. <![CDATA[
  737. if(fCheckRetrieveData(true) == false)return;
  738. misfGridIUD(grd_goodwin, "A");
  739. grd_goodwin.row = grd_goodwin.rows -grd_goodwin.fixedRows ;
  740. fDefaultSetting(grd_goodwin.row );
  741. grd_goodwin.col = grd_goodwin.colRef("goodcd");
  742. grd_goodwin.editCell();
  743. ]]>
  744. </script>
  745. </button>
  746. <button id="btn_search" class="btn1_letter2" style="left:1124px; top:29px; width:56px; height:22px; ">
  747. <caption>조회</caption>
  748. <script type="javascript" ev:event="DOMActivate">
  749. <![CDATA[
  750. if(fCheckRetrieveData(false) == false)return;
  751. model.setValue("/root/send/goodwin/retrmaxwinnoyn","Y");
  752. model.setValue(ipt_winno.attribute("ref"),"");
  753. misfMsterDetailRetrieve();
  754. fAfterRetrieve();
  755. ]]>
  756. </script>
  757. </button>
  758. <line id="line5" class="line_4" style="x1:1110px; y1:18px; x2:1110px; y2:61px; border-color:#ffe4bb; border-left-style:solid; "/>
  759. <caption id="caption8" class="search_name" style="left:15px; top:45; width:86px; height:17px; ">입고부서 :</caption>
  760. <caption id="caption11" class="search_name" style="left:308px; top:45px; width:86px; height:17px; ">거 래 처 :</caption>
  761. <caption id="caption12" class="search_name" style="left:15px; top:20px; width:86px; height:17px; ">입고일자 :</caption>
  762. <caption id="caption13" class="search_name" style="left:305px; top:20px; width:86px; height:17px; ">입고유형 :</caption>
  763. <caption id="caption14" class="search_name" style="left:520px; top:20px; width:99px; height:17px; ">입고담당자 :</caption>
  764. <input id="ipt_instcd" ref="/root/send/goodwin/instcd" visibility="hidden" style="left:1050px; top:15px; width:30px; height:19px; "/>
  765. <select1 id="cmb_windeptcd" ref="/root/send/goodwin/windeptcd" class="combo_s_essential" appearance="minimal" style="left:100px; top:45px; width:145px; height:19px; ">
  766. <choices>
  767. <itemset>
  768. <label/>
  769. <value/>
  770. </itemset>
  771. </choices>
  772. </select1>
  773. </group>
  774. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  775. <button id="button3" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  776. <caption>출력</caption>
  777. </button>
  778. <button id="button5" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  779. <caption>초기화</caption>
  780. </button>
  781. <line id="line2" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  782. <button id="btn_save" class="btn4_letter2" style="left:1070px; top:3px; width:56px; height:22px; ">
  783. <caption>저장</caption>
  784. <script type="javascript" ev:event="DOMActivate">
  785. <![CDATA[
  786. if(fCheckSaveData() == false)return;
  787. /* 기타입고는 인터페이스 전달하지 않는다 */
  788. //model.setValue("/root/send/save/interfacecustcdlist/purc_main_suplplcecd",rszfGetMainCust(purc_main_suplplcecd));
  789. //model.setValue("/root/send/save/interfacecustcdlist/drg_main_suplplcecd",rszfGetMainCust(drg_main_suplplcecd));
  790. model.setValue("/root/send/save/interfacecustcdlist/purc_main_suplplcecd",'xx');
  791. model.setValue("/root/send/save/interfacecustcdlist/drg_main_suplplcecd",'xx');
  792. misfSave("TXRSI00101");
  793. if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
  794. ]]>
  795. </script>
  796. </button>
  797. </group>
  798. </xhtml:body>
  799. </xhtml:html>