SMLAW00500_수동마감.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLP00600_수동마감.xrw
  4. * 설 명 : 특이결과기록관리
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 송요셉
  7. * 작 성 일 : 2007.07.04
  8. * 수정이력 :
  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>
  14. <xhtml:title>수동마감</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <endgoodlist>
  20. <chio/>
  21. <dutdeptnm/>
  22. <goodcd/>
  23. <goodnm/>
  24. <lotno/>
  25. <enddd/>
  26. <endtm/>
  27. <endseq/>
  28. <endernm/>
  29. <unitcost/>
  30. <stocqty/>
  31. <stocmon/>
  32. <winqty/>
  33. <winmon/>
  34. <useqty/>
  35. <usemon/>
  36. <dutdeptcd/>
  37. <posdeptcd/>
  38. <allsizespecid/>
  39. <goodspec/>
  40. <adjtqty/>
  41. <adjtmon/>
  42. </endgoodlist>
  43. </main>
  44. <send>
  45. <endsdd/>
  46. <endedd/>
  47. <endgoodlist/>
  48. <enddd/>
  49. <endflag/>
  50. <deptcd/>
  51. <deptcdlist/>
  52. </send>
  53. <init>
  54. <deptinfo>
  55. <cd/>
  56. </deptinfo>
  57. <dept>
  58. <appdeptcd/>
  59. </dept>
  60. <appdeptcd/>
  61. <endsdd/>
  62. <endedd/>
  63. <enddd/>
  64. <endflag>0</endflag>
  65. </init>
  66. <hidden>
  67. <ref>
  68. </ref>
  69. </hidden>
  70. </root>
  71. </instance>
  72. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  73. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  74. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  75. <script type="javascript" ev:event="xforms-ready">
  76. <![CDATA[
  77. fExeInitialize();
  78. ]]>
  79. </script>
  80. <submission id="TRLAF00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/deptinfo"/>
  81. <submission id="TRLAA00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/dept/appdeptcd"/>
  82. <submission id="TRLAW00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/endgoodlist"/>
  83. <submission id="TXLAW00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/message"/>
  84. <submission id="TRLAA00107" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/appdeptcd"/>
  85. </model>
  86. <script type="javascript">
  87. <![CDATA[
  88. /* @group : 수동마감
  89. * @ver : 2007.11.20
  90. * @by : 송요셉(ACK)
  91. * @-----------------------------------
  92. * @type : function
  93. * @access : public
  94. * @desc : 수동마감화면 기본설정
  95. */
  96. function fExeInitialize() {
  97. var iMaxCnt = 0;
  98. var toDay = getCurrentDate();
  99. //--------------------------------
  100. model.removeNodeset("/root/send");
  101. model.removeNodeset("/root/main/endgoodlist");
  102. //------------------------------------------
  103. model.makeValue("/root/init/endsdd", toDay);
  104. model.makeValue("/root/init/endedd", toDay);
  105. model.makeValue("/root/init/enddd", toDay);
  106. //--------------------------------------------------------------------
  107. model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  108. model.makeValue("/root/send/userid", getUserInfo("userid"));
  109. submit("TRLAF00402", false); // 사용자가 속한 과코드 조회
  110. model.makeValue("/root/send/posdeptcd", model.getValue("/root/init/deptinfo/cd"));
  111. submit("TRLAA00103"); // 부서코드 목록
  112. //-----------------------------------------------------------------
  113. iMaxCnt = Number(getNodesetCount("/root/init/dept/appdeptcd")) + 1;
  114. //model.makeValue("/root/init/dept/appdeptcd["+iMaxCnt+"]/cd", "00");
  115. //model.makeValue("/root/init/dept/appdeptcd["+iMaxCnt+"]/nm", "전체");
  116. //--------------------------------------------
  117. grd_endgoodlist.fixedcellcheckbox(0,1) = true;
  118. grd_endgoodlist.colHidden(1) = true;
  119. //----------------------
  120. //cmb_seadept.select(0);
  121. model.setValue("/root/init/appdeptcd", "-");
  122. model.refresh();
  123. }
  124. /* @group : 수동마감
  125. * @ver : 2007.11.20
  126. * @by : 송요셉(ACK)
  127. * @-----------------------------------
  128. * @type : function
  129. * @access : public
  130. * @desc : 마감조회/마감대상조회
  131. */
  132. function fGetGoodList() {
  133. //--------------------------------
  134. model.removeNodeset("/root/send");
  135. model.removeNodeset("/root/main/endgoodlist");
  136. //---------------------------------------------------------------------
  137. model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
  138. model.makeValue("/root/send/posdeptcd", model.getValue("/root/init/deptinfo/cd"));
  139. model.makeValue("/root/send/dutdeptcd", model.getValue("/root/init/appdeptcd"));
  140. model.makeValue("/root/send/endflag", model.getValue("/root/init/endflag"));
  141. model.makeValue("/root/send/endsdd", model.getValue("/root/init/endsdd"));
  142. model.makeValue("/root/send/endedd", model.getValue("/root/init/endedd"));
  143. model.makeValue("/root/send/enddd", model.getValue("/root/init/enddd"));
  144. model.makeValue("/root/send/goodflag", "");
  145. submit("TRLAW00501");
  146. }
  147. /* @group : 수동마감
  148. * @ver : 2007.11.20
  149. * @by : 송요셉(ACK)
  150. * @-----------------------------------
  151. * @type : function
  152. * @access : public
  153. * @desc : 구분에 따른 텍스트박스 활성화
  154. */
  155. function fExeendddview(){
  156. model.removeNodeset("/root/main/endgoodlist");
  157. if(model.getValue("/root/init/endflag") == '1'){ // 1 마감대상
  158. caption1.visible = true;
  159. input1.visible = true;
  160. btn_cnfm.visible = true;
  161. grd_endgoodlist.colHidden(1) = false;
  162. }
  163. else{ // 0 마감
  164. caption1.visible = false;
  165. input1.visible = false;
  166. btn_cnfm.visible = false;
  167. grd_endgoodlist.colHidden(1) = true;
  168. }
  169. model.refresh();
  170. }
  171. /* @group : 수동마감
  172. * @ver : 2007.11.20
  173. * @by : 송요셉(ACK)
  174. * @-----------------------------------
  175. * @type : function
  176. * @access : public
  177. * @desc : 마감목록 마감테이블에 저장
  178. */
  179. function fExeEqmtSave() {
  180. var iFindNo = 0;
  181. var sNode = "/root/main/endgoodlist";
  182. //---------------------------------------------
  183. if (model.getValue("/root/init/enddd") == "") {
  184. messageBox("날짜에 공백이 들어갈수 없습니다.", "I007");
  185. return false;
  186. }
  187. //-------------------------------------------------------
  188. iFindNo = grd_endgoodlist.findRow("Y", 1, 1, true, true);
  189. if (Number(iFindNo) <= 0) {
  190. messageBox("마감대상 물품을 선택하여 주십시오!", "I007");
  191. return false;
  192. }
  193. //----------------------------
  194. grd_endgoodlist.clearStatus();
  195. for (var iNo=1; iNo <= getNodesetCount(sNode); iNo++) {
  196. if (model.getValue(sNode+"["+iNo+"]/chio") == "Y") {
  197. grd_endgoodlist.addStatus(Number(iNo+1), "insert");
  198. }
  199. }
  200. //--------------------------------
  201. model.removeNodeset("/root/send");
  202. model.makeValue("/root/send/endgoodlist", grd_endgoodlist.getUpdateData());
  203. model.makeValue("/root/send/enddd", model.getValue("/root/init/enddd"));
  204. model.makeValue("/root/send/appdeptcd", model.getValue("/root/init/appdeptcd"));
  205. //-----------
  206. setAlertOn();
  207. if (submit("TXLAW00501")) {
  208. model.removeNodeset(sNode+"[chio='Y']"); // 저장할 목록 마감목록에서 삭제
  209. grd_endgoodlist.refresh();
  210. }
  211. }
  212. /* @group : 수동마감
  213. * @ver : 2007.11.20
  214. * @by : 송요셉(ACK)
  215. * @-----------------------------------
  216. * @type : function
  217. * @access : public
  218. * @desc : 마감목록 엑셀파일저장
  219. */
  220. function fExeSaveToExcel() {
  221. grd_endgoodlist.saveExcel("C:\\SMLAW00500_수동마감.xls", "수동마감", false, true);
  222. }
  223. ]]>
  224. </script>
  225. </xhtml:head>
  226. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  227. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  228. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  229. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; font-weight:bold; ">
  230. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  231. <line id="line3" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  232. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:112px; height:17px; ">마감조회일자 :</caption>
  233. <button id="btn_Ref" class="btn1_letter2" navindex="5" style="left:1123px; top:7px; width:56px; height:22px; ">
  234. <caption>조회</caption>
  235. <script type="javascript" ev:event="DOMActivate">
  236. <![CDATA[
  237. fGetGoodList();
  238. ]]>
  239. </script>
  240. </button>
  241. <caption id="caption11" class="search_n_b" style="left:234px; top:9px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  242. <input id="ipt_usdt" ref="/root/init/endsdd" class="input_s_essential" navindex="1" inputtype="date" format="yyyy-mm-dd" mask="exclude" showmask="true" style="left:132px; top:8px; width:95px; height:19px; font-weight:normal; "/>
  243. <input id="ipt_uedt" ref="/root/init/endedd" class="input_s_essential" navindex="2" inputtype="date" format="yyyy-mm-dd" mask="exclude" showmask="true" style="left:252px; top:8px; width:95px; height:19px; font-weight:normal; "/>
  244. <select1 id="cmb_seadept" ref="/root/init/appdeptcd" navindex="3" appearance="minimal" style="left:611px; top:8px; width:114px; height:19px; font-weight:normal; ">
  245. <choices>
  246. <itemset nodeset="/root/init/dept/appdeptcd">
  247. <label ref="nm"/>
  248. <value ref="cd"/>
  249. </itemset>
  250. </choices>
  251. </select1>
  252. <caption id="caption26" class="search_name" style="left:544px; top:9px; width:61px; height:17px; ">부서 :</caption>
  253. <caption id="caption4" class="search_name" visibility="visible" style="left:905px; top:9px; width:65px; height:17px; ">구분 :</caption>
  254. <select1 id="rdo_endflag" ref="/root/init/endflag" navindex="4" appearance="full" cellspacing="20" cols="2" overflow="visible" style="left:966px; top:9px; width:145px; height:19px; font-weight:normal; border-style:none; ">
  255. <choices>
  256. <item>
  257. <label>마감</label>
  258. <value>0</value>
  259. </item>
  260. <item>
  261. <label>마감대상</label>
  262. <value>1</value>
  263. </item>
  264. </choices>
  265. <script type="javascript" ev:event="xforms-value-changed">
  266. <![CDATA[
  267. fExeendddview();
  268. ]]>
  269. </script>
  270. </select1>
  271. </group>
  272. <caption id="caption3" class="tit_2" style="left:5px; top:55px; width:134px; height:14px; ">마감목록</caption>
  273. <datagrid id="grd_endgoodlist" nodeset="/root/main/endgoodlist" caption="^부서^물품코드^물품명^Lot번호^물품^마감일자^마감시간^마감차수^마감자명^단가^재고^재고^입고^입고^출고^출고^보정^보정^deptcd^deptcd2^ALL SIZE|^부서^물품코드^물품명^Lot번호^규격^마감일자^마감시간^마감차수^마감자명^단가^수량^금액^수량^금액^수량^금액^수량^금액^deptcd^deptcd2^ALL SIZE" colwidth="30, 70, 70, 150, 130, 70, 80, 60, 0, 60, 60, 50, 70, 50, 70, 50, 70, 50, 70, 0, 0, 0" dataheight="25" defaultrows="1" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:1194px; height:665px; font-weight:normal; ">
  274. <col checkvalue="Y,N" ref="chio" type="checkbox" visibility="visible"/>
  275. <col ref="dutdeptnm"/>
  276. <col ref="goodcd" style="text-align:center; "/>
  277. <col ref="goodnm" style="text-align:left; "/>
  278. <col ref="lotno"/>
  279. <col class="text_center" ref="goodspec"/>
  280. <col ref="enddd" format="yyyy-mm-dd" mask="exclude" showmask="true" style="text-align:center; "/>
  281. <col ref="endtm" format="hh:nn:ss" mask="exclude" showmask="true" style="text-align:center; "/>
  282. <col ref="endseq" visibility="hidden" style="text-align:right; "/>
  283. <col ref="endernm" style="text-align:center; "/>
  284. <col ref="unitcost" format="(-)#,###" style="text-align:right; "/>
  285. <col ref="stocqty" style="text-align:right; "/>
  286. <col ref="stocmon" format="(-)#,###" style="text-align:right; "/>
  287. <col ref="winqty" style="text-align:right; "/>
  288. <col ref="winmon" format="(-)#,###" style="text-align:right; "/>
  289. <col ref="useqty" style="text-align:right; "/>
  290. <col ref="usemon" format="(-)#,###" style="text-align:right; "/>
  291. <col class="text_right" ref="adjtqty" format="#,###" mask="exclude" showmask="true"/>
  292. <col class="text_right" ref="adjtmon" format="#,###" mask="exclude" showmask="true"/>
  293. <col ref="dutdeptcd" visibility="hidden"/>
  294. <col ref="posdeptcd" visibility="hidden"/>
  295. <col ref="allsizespecid"/>
  296. <script type="javascript" ev:event="onaftersort">
  297. <![CDATA[
  298. grd_endgoodlist.gridToInstance();
  299. ]]>
  300. </script>
  301. </datagrid>
  302. <caption id="caption1" visibility="hidden" style="left:1032px; top:52px; width:66px; height:17px; font-weight:bold; ">마감일자 :</caption>
  303. <input id="input1" ref="/root/init/enddd" class="input_s_essential" visibility="hidden" inputtype="date" style="left:1101px; top:50px; width:93px; height:19px; font-weight:normal; "/>
  304. </group>
  305. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  306. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">수동마감</caption>
  307. </group>
  308. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  309. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  310. <button id="btn_cnfm" class="btn4_letter2" navindex="6" visibility="hidden" style="left:1138px; top:3px; width:56px; height:22px; ">
  311. <caption>저장</caption>
  312. <script type="javascript" ev:event="DOMActivate">
  313. <![CDATA[
  314. fExeEqmtSave();
  315. ]]>
  316. </script>
  317. </button>
  318. <button id="button13" class="btn6_letter5" navindex="7" style="left:0px; top:3px; width:92px; height:22px; ">
  319. <caption>EXCEL출력</caption>
  320. <script type="javascript" ev:event="DOMActivate">
  321. <![CDATA[
  322. fExeSaveToExcel();
  323. ]]>
  324. </script>
  325. </button>
  326. </group>
  327. </xhtml:body>
  328. </xhtml:html>