SMAED00200_입출고관리.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMAED00200.xrw
  4. * 설 명 : 치기공 입출고 관리
  5. * 설 계 자 : 손승현
  6. * 작 성 자 : 최예원
  7. * 작 성 일 : 2010.11.01
  8. * 수정이력 : 2010.11.01 최예원 신규
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <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">
  13. <xhtml:head tag="1">
  14. <xhtml:title>치 기공접수</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <eqmtlist>
  20. <item>
  21. <sortno/>
  22. <basecd/>
  23. <basecdflagdesc/>
  24. <basecdcnts/>
  25. <basesuppdeptcd/>
  26. <basecdflag/>
  27. </item>
  28. </eqmtlist>
  29. <inoutlist>
  30. <item>
  31. <inoutgb/>
  32. <inoutseq/>
  33. <materialcd/>
  34. <inoutdt/>
  35. <inoutqty/>
  36. <cnclyn/>
  37. <cncldt/>
  38. <bigo/>
  39. </item>
  40. </inoutlist>
  41. <inoutdata>
  42. <inoutgb/>
  43. <materialcd/>
  44. <inoutdt/>
  45. <inoutqty/>
  46. <cnclyn/>
  47. <cncldt/>
  48. <bigo/>
  49. <inoutseq/>
  50. </inoutdata>
  51. <inoutgbcdlist>
  52. <item>
  53. <cdid>1</cdid>
  54. <cdnm>입고</cdnm>
  55. </item>
  56. <item>
  57. <cdid>2</cdid>
  58. <cdnm>출고</cdnm>
  59. </item>
  60. </inoutgbcdlist>
  61. <stocklist/>
  62. </main>
  63. <send>
  64. <srch>
  65. <srchfromdt/>
  66. <srchcncl/>
  67. <metalcd/>
  68. <useqty/>
  69. <srchtodt/>
  70. <inoutseq/>
  71. <srchmaterialcd/>
  72. </srch>
  73. <globalinstance>
  74. <instance1/>
  75. </globalinstance>
  76. <basecd/>
  77. <basecdflag/>
  78. </send>
  79. <init>
  80. <item>
  81. <count/>
  82. </item>
  83. </init>
  84. <hidden>
  85. </hidden>
  86. <temp>
  87. <item>
  88. <count/>
  89. </item>
  90. </temp>
  91. <init2>
  92. <item>
  93. <count/>
  94. </item>
  95. </init2>
  96. </root>
  97. </instance>
  98. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  99. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  100. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  101. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  102. <script type="javascript" src="../../../ast/dentalcraftweb/js/dentalcraftcombolist.js"/>
  103. <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
  104. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  105. <script type="javascript" ev:event="xforms-ready">
  106. <![CDATA[
  107. fGetScreenInit();
  108. fGetComboInit();
  109. // model.setValue("/root/send/srch/srchdt", getCurrentDate());
  110. btn_select.dispatch( "DOMActivate" );
  111. model.refresh();
  112. ]]>
  113. </script>
  114. <submission id="TRAVB00001"/>
  115. <submission id="TRAED00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srch" replace="instance" resultref="/root/main/acptlist"/>
  116. <submission id="TRAED00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/eqmtlist"/>
  117. <submission id="TRZBC00101"/>
  118. <submission id="TRAED00200" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/inoutlist"/>
  119. <submission id="TXAED00200" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/inoutdata" resultref="/root/temp"/>
  120. <submission id="TXAED00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/inoutdata" resultref="/root/temp"/>
  121. <submission id="TRAED00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden"/>
  122. <submission id="TXAED00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  123. <submission id="TRAED00300" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/stocklist"/>
  124. <submission id="TXAED00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  125. <submission id="TRAED00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srch" resultref="/root/init"/>
  126. <submission id="TRAED00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srch" resultref="/root/init2"/>
  127. <submission id="TXAED00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/inoutdata" resultref="/root/temp"/>
  128. </model>
  129. <script type="javascript">
  130. <![CDATA[
  131. var click_useqty = 0;
  132. /**
  133. * 콤보 초기화
  134. */
  135. function fGetComboInit() {
  136. // 근무지코드 셋팅
  137. aezfSetSuppDeptcd();
  138. // 금속종류 코드 LIST(대분류)
  139. model.setValue("/root/send/basecdflag", "H");
  140. submit("TRAED00103");
  141. model.refresh();
  142. }
  143. /**
  144. * 화면 기본 초기화
  145. */
  146. function fGetScreenInit() {
  147. model.removeNodeset("/root/main/inoutlist");
  148. model.resetInstanceNode("/root/main/inoutlist");
  149. model.resetInstanceNode("/root/main/inoutdata");
  150. model.resetInstanceNode("/root/send/srch");
  151. grp_prcpinfo.disabled = true;
  152. // tex_bigo.disabled = true;
  153. model.setValue("/root/send/srch/srchcncl", "N" );
  154. var curdate = getCurrentDate();
  155. model.setValue("/root/send/srch/srchfromdt", curdate );
  156. model.setValue("/root/send/srch/srchtodt", curdate);
  157. // 재고 LIST 조회
  158. submit("TRAED00300");
  159. model.refresh();
  160. }
  161. /**
  162. * 입출고 LIST 조회
  163. */
  164. function fGetInoutList() {
  165. submit("TRAED00200");
  166. model.refresh();
  167. }
  168. function fStockInsert(){
  169. model.makeValue("/root/send/data/m" , "i");
  170. model.makeValue("/root/send/data/materialcd" , model.getValue("/root/main/inoutdata/materialcd") );
  171. model.makeValue("/root/send/data/materialnm" , ipt_inoutqty.label );
  172. model.makeValue("/root/send/data/stockqty" , model.getValue("/root/main/inoutdata/inoutqty"));
  173. submit("TXAED00301");
  174. model.refresh();
  175. }
  176. ]]>
  177. </script>
  178. </xhtml:head>
  179. <xhtml:body guideline="1,804;2,791;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  180. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  181. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">치기공 입/출고 관리</caption>
  182. </group>
  183. <group id="grp_btn" style="left:0px; top:688px; width:800px; height:27px; ">
  184. <button id="btn_prt" class="btn6_letter2" style="left:3px; top:3px; width:56px; height:22px; ">
  185. <caption>출력</caption>
  186. <script type="javascript" ev:event="DOMActivate">
  187. <![CDATA[
  188. model.resetInstanceNode("/root/rexprnt/inoutlist/item");
  189. var row = getNodesetCount("/root/main/inoutlist/item");
  190. if( row > 0 ) {
  191. for (var i = 1 ; i <= row ; i++ ) {
  192. model.makeNode("/root/rexprnt/inoutlist/item[" + i + "]");
  193. model.copyNode("/root/rexprnt/inoutlist/item[" + i + "]" ,"/root/main/inoutlist/item[" + i + "]" );
  194. model.setValue("/root/rexprnt/inoutlist/item[" + i + "]/inoutgb", grd_maininfo.labelMatrix(i, grd_maininfo.colRef("inoutgb")) );
  195. model.setValue("/root/rexprnt/inoutlist/item[" + i + "]/materialcd", grd_maininfo.labelMatrix(i, grd_maininfo.colRef("materialcd")) );
  196. }
  197. exeReportPreview("RPAED00200", "XMLSTR" , "" , "" , "false" , "", "", "", "", "false");
  198. } else {
  199. messageBox("입/출고 LIST가", "I004", "조회 또는 등록 후 출력하십시오.");
  200. }
  201. model.refresh();
  202. ]]>
  203. </script>
  204. </button>
  205. <button id="btn_save" class="btn4_letter2" style="left:670px; top:3px; width:56px; height:22px; ">
  206. <caption>저장</caption>
  207. <script type="javascript" ev:event="DOMActivate">
  208. <![CDATA[
  209. var selrow = grd_maininfo.row;
  210. if( model.getValue("/root/main/inoutdata/inoutseq") == "" ) {
  211. // tex_bigo.disabled = true;
  212. messageBox("등록버튼을 클릭하셔서 입/출고 데이터를 입력한 후", "C003");
  213. } else {
  214. if( model.getValue("/root/main/inoutdata/inoutgb") == "" ) {
  215. messageBox("입/출고 구분 데이터를", "C001");
  216. } else if ( model.getValue("/root/main/inoutdata/materialcd") == "" ) {
  217. messageBox("금속 종류 데이터를", "C001");
  218. } else if ( model.getValue("/root/main/inoutdata/inoutdt") == "" ) {
  219. messageBox("입/출고 일자 데이터를", "C001");
  220. } else if ( model.getValue("/root/main/inoutdata/inoutqty") == "" ) {
  221. messageBox("입/출고 수량 데이터를", "C001");
  222. } else {
  223. if( model.getValue("/root/main/inoutlist/item["+selrow+"]/cnclyn") != "Y" ){
  224. model.setValue("/root/send/srch/srchmaterialcd", model.getValue("/root/main/inoutdata/materialcd"));
  225. model.setValue("/root/send/srch/inoutseq", model.getValue("/root/main/inoutdata/inoutseq"));
  226. submit("TRAED00202");
  227. if( model.getValue("/root/init/item/count") == 0 ) { // insert
  228. if ( messageBox("입/출고 데이터를","Q002")==6 ) {
  229. model.setValue("/root/main/inoutdata/cnclyn", "N" )
  230. model.setValue("/root/main/inoutdata/cncldt", "" );
  231. submit("TXAED00200"); // 입출고 저장
  232. fGetInoutList();
  233. model.resetInstanceNode("/root/main/inoutdata");
  234. }
  235. } else { // update
  236. if ( messageBox("입/출고 비고 데이터를","Q012")==6 ) {
  237. submit("TXAED00202"); // 입출고 UPDATE
  238. model.resetInstanceNode("/root/main/inoutdata");
  239. }
  240. }
  241. } else {
  242. messageBox("이미 삭제된 입/출고 데이터" , "E008");
  243. }
  244. }
  245. }
  246. model.refresh();
  247. ]]>
  248. </script>
  249. </button>
  250. <button id="btn_edit" class="btn4_letter2" style="left:730px; top:3px; width:56px; height:22px; ">
  251. <caption>삭제</caption>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. // tex_bigo.disabled = false;
  255. var selrow = grd_maininfo.row;
  256. var row = grd_maininfo.rows;
  257. if( row >1 ) {
  258. /* if( model.getValue("/root/main/inoutdata/bigo") == "" ) {
  259. messageBox("삭제시, 비고란에 취소사유를", "C001");
  260. } else {*/
  261. if( model.getValue("/root/main/inoutlist/item["+selrow+"]/cnclyn") != "Y" ) {
  262. if ( messageBox("입/출고 데이터를","Q001")==6 ) {
  263. model.setValue("/root/main/inoutdata/cnclyn", "Y")
  264. model.setValue("/root/main/inoutdata/cncldt", getCurrentDate());
  265. submit("TXAED00201");
  266. fGetInoutList();
  267. model.resetInstanceNode("/root/main/inoutdata");
  268. }
  269. } else {
  270. messageBox("이미 삭제된 입/출고 데이터" , "E008");
  271. }
  272. // }
  273. } else {
  274. messageBox("삭제할 입/출고" , "E013");
  275. }
  276. model.refresh();
  277. ]]>
  278. </script>
  279. </button>
  280. <button id="btn_clear" class="btn4_letter3" style="left:598px; top:3px; width:68px; height:22px; ">
  281. <caption>초기화</caption>
  282. <script type="javascript" ev:event="DOMActivate">
  283. <![CDATA[
  284. fGetScreenInit();
  285. fGetComboInit();
  286. ]]>
  287. </script>
  288. </button>
  289. </group>
  290. <group id="grp_main" scroll="auto" style="left:1px; top:13px; width:800px; height:675px; ">
  291. <group id="grp_srch" style="left:0px; top:9px; width:800px; height:35px; vertical-align:top; ">
  292. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:1px; top:0px; width:785px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  293. <line id="line16" class="line_4" style="x1:700px; y1:7px; x2:700px; y2:29px; "/>
  294. <button id="btn_select" class="btn1_letter2" style="left:715px; top:7px; width:56px; height:22px; ">
  295. <caption>조회</caption>
  296. <script type="javascript" ev:event="DOMActivate">
  297. <![CDATA[
  298. if( model.getValue("/root/send/srch/srchcncl") == "" ){
  299. model.setValue("/root/send/srch/srchcncl", "N" );
  300. }
  301. model.resetInstanceNode("/root/main/inoutlist");
  302. fGetInoutList();
  303. ]]>
  304. </script>
  305. </button>
  306. <input id="ipt_srchfromdd" ref="/root/send/srch/srchfromdt" class="input_s_essential" inputtype="date" style="left:110px; top:8px; width:100px; height:19px; ">
  307. <script type="javascript" ev:event="onkeydown">
  308. <![CDATA[
  309. if( model.getValue("/root/send/srch/srchdt") == ""){
  310. if ( event.keyCode == 13 ) {
  311. model.refresh();
  312. model.removeNodeset("/root/main/inoutlist");
  313. fGetInoutList();
  314. }
  315. }
  316. ]]>
  317. </script>
  318. </input>
  319. <caption id="lbl_srchsearch" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">조회일자 :</caption>
  320. <bool id="bool1" checkvalue="Y,N" ref="/root/send/srch/srchcncl" style="left:341px; top:7px; width:25px; height:20px; "/>
  321. <caption id="caption75" style="left:366px; top:8px; width:74px; height:20px; ">취소포함</caption>
  322. <input id="ipt_srchtodd" ref="/root/send/srch/srchtodt" class="input_s_essential" inputtype="date" style="left:230px; top:8px; width:100px; height:19px; ">
  323. <script type="javascript" ev:event="onkeydown">
  324. <![CDATA[
  325. if( model.getValue("/root/send/srch/srchdt") == ""){
  326. if ( event.keyCode == 13 ) {
  327. model.refresh();
  328. model.removeNodeset("/root/main/inoutlist");
  329. fGetInoutList();
  330. }
  331. }
  332. ]]>
  333. </script>
  334. </input>
  335. <caption id="caption3" style="left:210px; top:6px; width:20px; height:25px; text-align:center; ">~</caption>
  336. </group>
  337. <datagrid id="grd_maininfo" nodeset="/root/main/inoutlist/item" caption="No^입/출고 구분^금속명^일 자^수 량^취소여부^취소일자^비고" colsep="^" colwidth="40, 80, 150, 90, 60, 70, 90, 180" dataheight="23" defaultrows="1" ellipsis="true" extendlastcol="scroll" focuscolor="#b9e5fb" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:80px; width:785px; height:480px; text-align:center; ">
  338. <col ref="inoutseq" type="output"/>
  339. <col ref="inoutgb" type="combo">
  340. <choices>
  341. <itemset nodeset="/root/main/inoutgbcdlist/item">
  342. <label ref="cdnm"/>
  343. <value ref="cdid"/>
  344. </itemset>
  345. </choices>
  346. </col>
  347. <col ref="materialcd" type="combo">
  348. <choices>
  349. <itemset nodeset="/root/main/eqmtlist/item">
  350. <label ref="basecdflagdesc"/>
  351. <value ref="basecd"/>
  352. </itemset>
  353. </choices>
  354. </col>
  355. <col ref="inoutdt" type="output"/>
  356. <col ref="inoutqty" type="output"/>
  357. <col ref="cnclyn"/>
  358. <col ref="cncldt" format="yyyy-mm-dd"/>
  359. <col ref="bigo" format="yyyy-mm-dd"/>
  360. <script type="javascript" ev:event="ondblclick">
  361. <![CDATA[
  362. var row = grd_maininfo.rows;
  363. var idx = grd_maininfo.row;
  364. if( row > 1 ) {
  365. model.copyNode("/root/main/inoutdata","/root/main/inoutlist/item["+ idx +"]");
  366. } else {
  367. messageBox("조회된 입/출고 정보가", "I004");
  368. }
  369. click_useqty = model.getValue("/root/main/inoutdata/inoutqty");
  370. grp_prcpinfo.disabled = true;
  371. // tex_bigo.disabled = true;
  372. model.refresh();
  373. ]]>
  374. </script>
  375. </datagrid>
  376. <caption id="caption45" class="tit_2" style="left:5px; top:53px; width:105px; height:14px; ">입/출고 정보</caption>
  377. <line id="line18" class="line_1" style="x1:0px; y1:70px; x2:785px; y2:70px; "/>
  378. <group id="grp_prcpinfo" disabled="true" style="left:0px; top:560px; width:785px; height:110px; ">
  379. <caption id="caption31" class="tit_2" style="left:8px; top:10px; width:127px; height:13px; ">입출고 등록/삭제</caption>
  380. <line id="line5" class="line_1" style="x1:0px; y1:27px; x2:785px; y2:27px; "/>
  381. <caption id="lbl_rsrvdd" class="cell_1" style="left:196px; top:38px; width:80px; height:20px; text-align:center; vertical-align:middle; ">입/출고 일자</caption>
  382. <input id="ipt_rsrvdd" ref="/root/main/inoutdata/inoutdt" class="input_essential" inputtype="date" style="left:280px; top:38px; width:133px; height:19px; "/>
  383. <caption id="lbl_state" class="cell_1" style="left:1px; top:63px; width:80px; height:20px; text-align:center; vertical-align:middle; ">입/출고 구분</caption>
  384. <select1 id="cmb_inoutgb" ref="/root/main/inoutdata/inoutgb" class="combo_search" appearance="minimal" style="left:85px; top:63px; width:100px; height:19px; ">
  385. <choices>
  386. <itemset nodeset="/root/main/inoutgbcdlist/item">
  387. <label ref="cdnm"/>
  388. <value ref="cdid"/>
  389. </itemset>
  390. </choices>
  391. </select1>
  392. <caption id="caption38" class="cell_1" style="left:1px; top:89px; width:80px; height:20px; text-align:center; vertical-align:middle; ">입/출고 수량</caption>
  393. <caption id="caption1" class="cell_1" style="left:196px; top:64px; width:80px; height:20px; text-align:center; vertical-align:middle; ">금 속 종 류</caption>
  394. <select1 id="cmb_materialcd" ref="/root/main/inoutdata/materialcd" class="combo_search" appearance="minimal" style="left:280px; top:64px; width:133px; height:19px; ">
  395. <choices>
  396. <itemset nodeset="/root/main/eqmtlist/item">
  397. <label ref="basecdflagdesc"/>
  398. <value ref="basecd"/>
  399. </itemset>
  400. </choices>
  401. </select1>
  402. <caption id="caption2" class="cell_1" style="left:1px; top:37px; width:80px; height:20px; text-align:center; vertical-align:middle; ">입/출고 N O</caption>
  403. <input id="ipt_inoutseq" ref="/root/main/inoutdata/inoutseq" class="input_default" disabled="true" imemode="hangul" maxlength="100" style="left:85px; top:37px; width:100px; height:19px; "/>
  404. <input id="ipt_inoutqty" ref="/root/main/inoutdata/inoutqty" class="input_default" imemode="hangul" maxlength="100" style="left:85px; top:89px; width:100px; height:19px; ">
  405. <script type="javascript" ev:event="xforms-value-changed">
  406. <![CDATA[
  407. var inoutqty = model.getValue("/root/main/inoutdata/inoutqty");
  408. var flag = "";
  409. flag = isNaN(inoutqty);
  410. if( flag != false ) {
  411. messageBox("수량은 숫자로", "C001");
  412. }
  413. ]]>
  414. </script>
  415. </input>
  416. </group>
  417. <button id="btn_exec" class="btn2_letter2" style="left:740px; top:565px; width:42px; height:19px; ">
  418. <caption>등록</caption>
  419. <script type="javascript" ev:event="DOMActivate">
  420. <![CDATA[
  421. model.resetInstanceNode("/root/main/inoutdata");
  422. grp_prcpinfo.disabled = false;
  423. // tex_bigo.disabled = false;
  424. ipt_inoutseq.disabled = true;
  425. //입/출고NO 가져오기
  426. var curdate = getCurrentDate();
  427. submit("TRAED00201");
  428. model.setValue("/root/main/inoutdata/inoutdt", curdate);
  429. if(model.getValue("/root/hidden/item/inoutseq") == "" ) {
  430. model.setValue("/root/main/inoutdata/inoutseq", "1");
  431. } else {
  432. model.setValue("/root/main/inoutdata/inoutseq", model.getValue("/root/hidden/item/inoutseq") );
  433. }
  434. model.refresh();
  435. ]]>
  436. </script>
  437. </button>
  438. <caption id="lbl_bigo" class="cell_1" style="left:425px; top:597px; width:40px; height:72px; text-align:center; vertical-align:middle; ">비고</caption>
  439. </group>
  440. <textarea id="tex_bigo" ref="/root/main/inoutdata/bigo" style="left:471px; top:610px; width:314px; height:71px; "/>
  441. </xhtml:body>
  442. </xhtml:html>