SMRSI00300_기타입고관리.xrw 47 KB

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