SMMNG02600_세탁물위탁수탁관리.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>위탁수탁관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <csmtinfo>
  11. <csmtinlist>
  12. <ioflag/>
  13. <cdnm/>
  14. <csmtcnt/>
  15. <remark1/>
  16. <instcd/>
  17. <csmtdd/>
  18. <goodscd/>
  19. <csmtkgcnt/>
  20. <csmtflag/>
  21. </csmtinlist>
  22. </csmtinfo>
  23. <cond>
  24. <csmtdd/>
  25. <deptcd/>
  26. <selyymmdd/>
  27. </cond>
  28. <csrdeptlist/>
  29. <csmtoutinfo>
  30. <csmtoutlist>
  31. <ioflag/>
  32. <cdnm/>
  33. <csmtcnt/>
  34. <remark1/>
  35. <instcd/>
  36. <csmtdd/>
  37. <goodscd/>
  38. <csmtkgcnt/>
  39. <csmtflag/>
  40. </csmtoutlist>
  41. </csmtoutinfo>
  42. <csmtrexinfo/>
  43. <csmtrexioinfo/>
  44. </main>
  45. <send>
  46. <csmtdd/>
  47. <report/>
  48. <ioflag/>
  49. <ymflag/>
  50. <selyymmdd/>
  51. <gubuncd>01</gubuncd>
  52. <kgqtyflag/>
  53. <kgqtyflagnm/>
  54. </send>
  55. </root>
  56. </instance>
  57. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  60. <script type="javascript" ev:event="xforms-ready">
  61. <![CDATA[
  62. fInitialize();
  63. ]]>
  64. </script>
  65. <submission id="TRMNG02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/csmtinfo"/>
  66. <submission id="TRMNG02602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/csmtoutinfo"/>
  67. <submission id="TXMNG02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  68. <submission id="TXMNG02602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp2"/>
  69. <submission id="TRMNG02603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/csmtrexinfo"/>
  70. <submission id="TRMNG02604" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/csmtrexioinfo"/>
  71. </model>
  72. <script type="javascript">
  73. <![CDATA[
  74. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  75. function fInitialize()
  76. {
  77. model.setValue(ipt_csmtdd.attribute("ref"), getCurrentDate());
  78. rdo_selyymmdd.select(0); //디폴트 일별조회
  79. rdo_selyymmdd.refresh();
  80. ipt_csmtdd.refresh();
  81. fSearch();
  82. }
  83. function fSearch() {
  84. model.setValue("/root/send/gubuncd", model.getValue(rdo_gubuncd.attribute("ref"))); //마스터코드구분 01:물품마스터02:창고마스터
  85. var reqdd = model.getValue(ipt_csmtdd.attribute("ref"));
  86. btn_sav.disabled = false;
  87. btn_outsav.disabled = false;
  88. if (model.getValue(rdo_selyymmdd.attribute("ref")) == 'MM' ) {
  89. reqdd = reqdd.substr(0,6) ;
  90. btn_sav.disabled = true;
  91. btn_outsav.disabled = true;
  92. } else if (model.getValue(rdo_selyymmdd.attribute("ref")) == 'YY' ){
  93. reqdd = reqdd.substr(0,4);
  94. btn_sav.disabled = true;
  95. btn_outsav.disabled = true;
  96. }
  97. model.setValue("/root/send/csmtdd", reqdd );
  98. submit("TRMNG02601");
  99. var ioflag;
  100. var unityn;
  101. var exchngamt;
  102. for(var i = grd_csmtinlist.fixedRows; i < grd_csmtinlist.rows; i++) {
  103. ioflag = grd_csmtinlist.valueMatrix(i, grd_csmtinlist.colRef("ioflag"));
  104. unityn = grd_csmtinlist.valueMatrix(i, grd_csmtinlist.colRef("unityn"));
  105. exchngamt = grd_csmtinlist.valueMatrix(i, grd_csmtinlist.colRef("exchngamt"));
  106. if(unityn == "Y") {
  107. grd_csmtinlist.isReadOnly(i, grd_csmtinlist.colRef("csmtcnt"),i, grd_csmtinlist.colRef("csmtcnt")) = false;
  108. grd_csmtinlist.isReadOnly(i, grd_csmtinlist.colRef("csmtkgcnt"),i, grd_csmtinlist.colRef("csmtkgcnt")) = true;
  109. } else {
  110. grd_csmtinlist.isReadOnly(i, grd_csmtinlist.colRef("csmtkgcnt"),i, grd_csmtinlist.colRef("csmtkgcnt")) = false;
  111. grd_csmtinlist.isReadOnly(i, grd_csmtinlist.colRef("csmtcnt"),i, grd_csmtinlist.colRef("csmtcnt")) = true;
  112. }
  113. if(ioflag == "N") {
  114. grd_csmtinlist.rowStatus(i) = "1";
  115. }
  116. }
  117. grd_csmtinlist.mergecol(1)=false;
  118. grd_csmtinlist.mergecol(2)=false;
  119. grd_csmtinlist.mergecol(3)=false;
  120. grd_csmtinlist.mergecol(4)=false;
  121. grd_csmtinlist.mergecells="bycol";
  122. submit("TRMNG02602");
  123. //var ioflag;
  124. for(var i = grd_csmtoutlist.fixedRows; i < grd_csmtoutlist.rows; i++) {
  125. ioflag = grd_csmtoutlist.valueMatrix(i, grd_csmtoutlist.colRef("ioflag"));
  126. if(ioflag == "N") {
  127. grd_csmtoutlist.rowStatus(i) = "1";
  128. }
  129. }
  130. grd_csmtinlist.subtotalPosition = "below";
  131. grd_csmtinlist.subtotal("sum", -1, grd_csmtinlist.colRef("csmtcnt") , "#,###", "", grd_csmtinlist.colRef("cdnm"), "합계");
  132. grd_csmtinlist.subtotal("sum", -1, grd_csmtinlist.colRef("csmtkgcnt") , "#,###.##", "", grd_csmtinlist.colRef("cdnm"), "합계");
  133. grd_csmtoutlist.subtotalPosition = "below";
  134. grd_csmtoutlist.subtotal("sum", -1, grd_csmtoutlist.colRef("csmtcnt") , "#,###", "", grd_csmtoutlist.colRef("cdnm"), "합계");
  135. grd_csmtoutlist.subtotal("sum", -1, grd_csmtoutlist.colRef("csmtkgcnt") , "#,###", "", grd_csmtoutlist.colRef("cdnm"), "합계");
  136. }
  137. function fPrintRex() {
  138. submit("TRMNG02603");
  139. model.makeNode("/root/send/report/csmtrexinfo");
  140. copyNodesetType("/root/send/report/csmtrexinfo", "/root/main/csmtrexinfo");
  141. exeReportPreview("RPMNG02600", "XMLSTR", "/root/send/report/csmtrexinfo");
  142. }
  143. function InOutPrintRex(ioflag, ymflag) {
  144. model.setValue("/root/send/ioflag", ioflag);
  145. model.setValue("/root/send/ymflag", ymflag);
  146. model.setValue("/root/send/kgqtyflag", "1");
  147. model.setValue("/root/send/kgqtyflagnm", "Kg");
  148. var reqdd = model.getValue(ipt_csmtdd.attribute("ref"));
  149. if (ymflag == "Y") {
  150. reqdd = reqdd.substr(0,4);
  151. } else if (ymflag == "M") {
  152. reqdd = reqdd.substr(0,6);
  153. }
  154. model.setValue("/root/send/csmtdd", reqdd);
  155. submit("TRMNG02604");
  156. model.makeNode("/root/send/report/csmtrexioinfo");
  157. copyNodesetType("/root/send/report/csmtrexioinfo", "/root/main/csmtrexioinfo/csmtrexiolist");
  158. model.makeValue("/root/send/report/kgqtyflag", "1");
  159. model.makeValue("/root/send/report/kgqtyflagnm", "Kg");
  160. exeReportPreview("RPMNG02601", "XMLSTR", "/root/send/report/csmtrexioinfo");
  161. if(ioflag == "IN") {
  162. model.setValue("/root/send/kgqtyflag", "2");
  163. model.setValue("/root/send/kgqtyflagnm", "장");
  164. submit("TRMNG02604");
  165. model.makeNode("/root/send/report/csmtrexioinfo");
  166. copyNodesetType("/root/send/report/csmtrexioinfo", "/root/main/csmtrexioinfo/csmtrexiolist");
  167. model.makeValue("/root/send/report/kgqtyflag", "2");
  168. model.makeValue("/root/send/report/kgqtyflagnm", "장");
  169. exeReportPreview("RPMNG02601", "XMLSTR", "/root/send/report/csmtrexioinfo");
  170. }
  171. }
  172. ]]>
  173. </script>
  174. </xhtml:head>
  175. <xhtml:body pagewidth="1100" pageheight="600" guideline="1,1107;2,546;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  176. <group id="grp_tle" style="left:0px; top:0px; width:1080px; height:13px; ">
  177. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">위탁 수탁 관리</caption>
  178. </group>
  179. <group id="grp_biz" scroll="auto" style="left:0px; top:60px; width:540px; height:453px; ">
  180. <caption id="caption12" class="tit_2" style="left:5px; top:9px; width:121px; height:14px; ">수탁량관리</caption>
  181. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:540px; y2:26px; "/>
  182. <button id="btn_sav" class="btn5_letter2" style="left:495px; top:3px; width:42px; height:19px; ">
  183. <caption>저장</caption>
  184. <script type="javascript" ev:event="DOMActivate">
  185. <![CDATA[
  186. model.makeValue("/root/send/savedata/csmtinlist", getGridUpdateData(grd_csmtinlist) );
  187. //alert(instance1.selectNodesXml("/root/send"));
  188. submit("TXMNG02601");
  189. fSearch();
  190. ]]>
  191. </script>
  192. </button>
  193. <datagrid id="grd_csmtinlist" nodeset="/root/main/csmtinfo/csmtinlist" caption="물품코드^품목명^장^Kg^특이사항^기관번호^년월^품목코드^Kg^구분코드^exchngamt^unityn^caption1^망순번" colsep="^" colwidth="0, 150, 65, 65, 225, 74, 100, 65, 76, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:29px; width:540px; height:421px; ">
  194. <col ref="ioflag"/>
  195. <col ref="cdnm" visibility="visible"/>
  196. <col ref="csmtcnt" type="input" style="text-align:right; "/>
  197. <col ref="csmtkgcnt" type="input" visibility="visible" format="#,###.###" style="text-align:right; "/>
  198. <col ref="remark1" type="input" visibility="visible"/>
  199. <col ref="instcd" type="input" visibility="hidden"/>
  200. <col ref="csmtdd" visibility="hidden"/>
  201. <col ref="goodscd" visibility="hidden"/>
  202. <col ref="csmtkgcnt" type="hidden" visibility="hidden"/>
  203. <col ref="csmtflag" visibility="hidden"/>
  204. <col ref="exchngamt" visibility="hidden"/>
  205. <col ref="unityn" visibility="hidden"/>
  206. <script type="javascript" ev:event="xforms-value-changed">
  207. <![CDATA[
  208. var remark1 = "";
  209. if(grd_csmtinlist.col == grd_csmtinlist.colRef("remark1")) {
  210. remark1 = grd_csmtinlist.valueMatrix(grd_csmtinlist.row, grd_csmtinlist.col);
  211. for(var i = grd_csmtinlist.fixedRows; i < grd_csmtinlist.rows; i++) {
  212. if (grd_csmtinlist.rowStatus(i) == "1" || grd_csmtinlist.rowStatus(i) == "3" ) {
  213. grd_csmtinlist.rowStatus(i) = "1";
  214. } else if (grd_csmtinlist.rowStatus(i) == "2" || grd_csmtinlist.rowStatus(i) == "0") {
  215. grd_csmtinlist.rowStatus(i) = "2";
  216. }
  217. grd_csmtinlist.valueMatrix(i, grd_csmtinlist.col) = remark1;
  218. }
  219. }
  220. var exchngamt = 0;
  221. var csmtcnt = 0;
  222. if(grd_csmtinlist.col == grd_csmtinlist.colRef("csmtcnt")) {
  223. csmtcnt = grd_csmtinlist.valueMatrix(grd_csmtinlist.row, grd_csmtinlist.colRef("csmtcnt"));
  224. exchngamt = grd_csmtinlist.valueMatrix(grd_csmtinlist.row, grd_csmtinlist.colRef("exchngamt"));
  225. grd_csmtinlist.valueMatrix(grd_csmtinlist.row, grd_csmtinlist.colRef("csmtkgcnt")) = csmtcnt * exchngamt;
  226. }
  227. ]]>
  228. </script>
  229. <script type="javascript" ev:event="onkeypress">
  230. <![CDATA[
  231. var row = grd_csmtinlist.row;
  232. if(event.keyCode == 13) { // Enter 쳤을 경우 아래 수량으로
  233. if(grd_csmtinlist.col == grd_csmtinlist.colRef("csmtcnt")) { //불출수량이나 미불출수량 엔터시
  234. if(grd_csmtinlist.row + 1 < grd_csmtinlist.rows) {
  235. grd_csmtinlist.row = row + 1;
  236. }
  237. }
  238. }
  239. ]]>
  240. </script>
  241. </datagrid>
  242. <button id="button2" class="btn2_letter4" style="left:428px; top:3px; width:64px; height:19px; ">
  243. <caption>월계출력</caption>
  244. <script type="javascript" ev:event="DOMActivate">
  245. <![CDATA[
  246. InOutPrintRex("IN","M");
  247. ]]>
  248. </script>
  249. </button>
  250. <button id="button4" class="btn2_letter4" style="left:361px; top:3px; width:64px; height:19px; ">
  251. <caption>년계출력</caption>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. InOutPrintRex("IN","Y");
  255. ]]>
  256. </script>
  257. </button>
  258. <select1 id="rdo_gubuncd" ref="/root/send/gubuncd" disabled="true" visibility="hidden" appearance="full" cols="2" overflow="visible" style="left:140px; top:5px; width:165px; height:15px; border-style:none; ">
  259. <choices>
  260. <item>
  261. <label>물품마스터</label>
  262. <value>01</value>
  263. </item>
  264. <item>
  265. <label>창고마스터</label>
  266. <value>02</value>
  267. </item>
  268. </choices>
  269. </select1>
  270. </group>
  271. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:1083px; height:35px; background-color:#fffbf2; border-color:#ffd799; ">.,m</shape>
  272. <caption id="cap_csrreqdeptcd" class="search_name" style="left:15px; top:30px; width:67px; height:17px; ">일자:</caption>
  273. <button id="btn_search" class="btn1_letter2" navindex="2" style="left:957px; top:26px; width:56px; height:22px; ">
  274. <caption>조회</caption>
  275. <script type="javascript" ev:event="DOMActivate">
  276. <![CDATA[
  277. fSearch();
  278. ]]>
  279. </script>
  280. </button>
  281. <input id="ipt_csmtdd" ref="/root/main/cond/csmtdd" class="input_default" inputtype="date" maxlength="6" format="yyyy-mm-dd" style="left:77px; top:28px; width:93px; height:19px; ">
  282. <script type="javascript" ev:event="xforms-value-changed">
  283. <![CDATA[
  284. fSearch();
  285. ]]>
  286. </script>
  287. </input>
  288. <line id="line2" class="line_4" style="x1:952px; y1:25px; x2:952px; y2:50px; "/>
  289. <group id="group1" scroll="auto" style="left:540px; top:60px; width:542px; height:453px; ">
  290. <caption id="caption1" class="tit_2" style="left:7px; top:6px; width:121px; height:13px; ">위탁량관리</caption>
  291. <line id="line3" class="line_1" style="x1:0px; y1:24px; x2:538px; y2:24px; "/>
  292. <button id="btn_outsav" class="btn5_letter2" style="left:496px; top:3px; width:42px; height:19px; ">
  293. <caption>저장</caption>
  294. <script type="javascript" ev:event="DOMActivate">
  295. <![CDATA[
  296. model.makeValue("/root/send/savedata/csmtoutlist", getGridUpdateData(grd_csmtoutlist) );
  297. submit("TXMNG02602");
  298. fSearch();
  299. ]]>
  300. </script>
  301. </button>
  302. <datagrid id="grd_csmtoutlist" nodeset="/root/main/csmtoutinfo/csmtoutlist" caption="물품코드^품목명^Kg/장^Kg/장^비고^기관번호^년월^품목코드^구분코드^caption1^망순번" colsep="^" colwidth="0, 150, 65, 66, 289, 100, 65, 76, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:29px; width:540px; height:421px; ">
  303. <col ref="ioflag"/>
  304. <col ref="cdnm" visibility="visible"/>
  305. <col ref="csmtkgcnt" type="input" visibility="visible" format="#,###" style="text-align:right; "/>
  306. <col ref="csmtcnt" type="input" visibility="hidden" format="#,###" style="text-align:right; "/>
  307. <col ref="remark1" type="input" visibility="visible"/>
  308. <col ref="instcd" type="input" visibility="hidden"/>
  309. <col ref="csmtdd" visibility="hidden"/>
  310. <col ref="goodscd" visibility="hidden"/>
  311. <col ref="csmtflag" visibility="hidden"/>
  312. <script type="javascript" ev:event="onkeypress">
  313. <![CDATA[
  314. var row = grd_csmtoutlist.row;
  315. if(event.keyCode == 13) { // Enter 쳤을 경우 아래 수량으로
  316. if(grd_csmtoutlist.col == grd_csmtoutlist.colRef("csmtcnt")) { //불출수량이나 미불출수량 엔터시
  317. if(grd_csmtoutlist.row + 1 < grd_csmtoutlist.rows) {
  318. grd_csmtoutlist.row = row + 1;
  319. }
  320. }
  321. }
  322. ]]>
  323. </script>
  324. </datagrid>
  325. <button id="button3" class="btn2_letter4" style="left:429px; top:3px; width:64px; height:19px; ">
  326. <caption>월계출력</caption>
  327. <script type="javascript" ev:event="DOMActivate">
  328. <![CDATA[
  329. InOutPrintRex("OUT","M");
  330. ]]>
  331. </script>
  332. </button>
  333. <button id="button5" class="btn2_letter4" style="left:362px; top:3px; width:64px; height:19px; ">
  334. <caption>년계출력</caption>
  335. <script type="javascript" ev:event="DOMActivate">
  336. <![CDATA[
  337. InOutPrintRex("OUT","Y");
  338. ]]>
  339. </script>
  340. </button>
  341. </group>
  342. <button id="btn_prt" class="btn1_letter2" style="left:1015px; top:26px; width:56px; height:22px; ">
  343. <caption>출력</caption>
  344. <script type="javascript" ev:event="DOMActivate">
  345. <![CDATA[
  346. fPrintRex();
  347. ]]>
  348. </script>
  349. </button>
  350. <caption id="caption2" class="search_name" style="left:180px; top:29px; width:85px; height:17px; ">일자구분:</caption>
  351. <select1 id="rdo_selyymmdd" ref="/root/main/cond/selyymmdd" appearance="full" cols="3" overflow="visible" style="left:265px; top:29px; width:175px; height:20px; border-style:none; ">
  352. <choices>
  353. <item>
  354. <label>일별</label>
  355. <value>DD</value>
  356. </item>
  357. <item>
  358. <label>월별</label>
  359. <value>MM</value>
  360. </item>
  361. <item>
  362. <label>년별</label>
  363. <value>YY</value>
  364. </item>
  365. </choices>
  366. <script type="javascript" ev:event="xforms-value-changed">
  367. <![CDATA[
  368. fSearch();
  369. ]]>
  370. </script>
  371. </select1>
  372. <select1 id="radio1" ref="/root/send/gubuncd" disabled="true" visibility="hidden" appearance="full" cols="2" overflow="visible" style="left:485px; top:30px; width:390px; height:15px; border-style:none; ">
  373. <choices>
  374. <item>
  375. <label>물품마스터</label>
  376. <value>01</value>
  377. </item>
  378. <item>
  379. <label>창고마스터</label>
  380. <value>02</value>
  381. </item>
  382. </choices>
  383. </select1>
  384. </xhtml:body>
  385. </xhtml:html>