SMRSO20500_월마감(부서재고)(경북대).xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>월마감(부서재고)</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <magam>
  11. <magamlist/>
  12. </magam>
  13. </main>
  14. <send>
  15. <search>
  16. <instcd/>
  17. <endmonth/>
  18. <deptcd/>
  19. <deptnm/>
  20. <workyn/>
  21. <endyn/>
  22. </search>
  23. <save>
  24. </save>
  25. <magamsearch>
  26. <instcd/>
  27. <dd/>
  28. <deptcd/>
  29. </magamsearch>
  30. </send>
  31. <init>
  32. </init>
  33. <temp>
  34. </temp>
  35. <hidden>
  36. </hidden>
  37. <magam/>
  38. <distrimagam/>
  39. </root>
  40. </instance>
  41. <submission id="TRRSO20401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/temp"/>
  42. <submission id="TXRSO20501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/temp"/>
  43. <submission id="TRRSO21002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/magamsearch" resultref="/root/magam"/>
  44. <submission id="TRRSO20502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/magam"/>
  45. <submission id="TXRSO20502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/temp"/>
  46. <submission id="TRRSO21003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/magamsearch" resultref="/root/distrimagam"/>
  47. </model>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. //화면 Control을 초기화한다
  51. misfComboInstCdListMulti("cmb_instcd",getCurrentDate(),"","N"); //기관
  52. misfGridInit(grd_magam);
  53. misfGetAndSetUserInfo(); //접속자기본정보
  54. model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); //기관 설정
  55. model.setValue("/root/send/search/endmonth" , getCurrentDate().substr(0, 6) ); //마감년월 설정
  56. model.setValue("/root/send/search/workyn", "Y"); //Y:마감작업, N:마감취소
  57. model.setValue("/root/send/search/deptcd", DUT_PLCEDEPT_CD);
  58. model.setValue("/root/send/search/deptnm", DUT_PLCEDEPT_NM);
  59. if(DUT_PLCEDEPT_CD == "4020334000"){
  60. btn_distriendY.visible = true;
  61. btn_distriendN.visible = true;
  62. }else{
  63. btn_distriendY.visible = false;
  64. btn_distriendN.visible = false;
  65. }
  66. model.setValue("/root/send/magamsearch/instcd", getUserInfo("dutplceinstcd"));
  67. model.setValue("/root/send/magamsearch/dd", getCurrentDate().substr(0, 6));
  68. model.setValue("/root/send/magamsearch/deptcd", DUT_PLCEDEPT_CD);
  69. reMagamYN(); //물류마감,해당부서 마감여부조회
  70. reEndDeptList();//마감부서리스트 조회
  71. model.refresh();
  72. ]]>
  73. </script>
  74. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  75. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/numericHelper.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/dateHelper.js"/>
  80. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  81. <script type="javascript">
  82. <![CDATA[
  83. var distriyn = "N";
  84. function reMagamYN(){
  85. cap_magam.value = "";
  86. if(submit("TRRSO21003")){
  87. var endyn = model.getValue("/root/distrimagam/endyn");
  88. if(endyn == "Y"){
  89. cap_magam.value = "물류마감이 되어있습니다.";
  90. btn_distriendY.disabled = true;
  91. btn_distriendN.disabled = false;
  92. btn_exec.disabled = true;
  93. distriyn = "Y";
  94. }else{
  95. cap_magam.value = "";
  96. btn_distriendY.disabled = false;
  97. btn_distriendN.disabled = true;
  98. btn_exec.disabled = false;
  99. distriyn = "N";
  100. if(submit("TRRSO21002")){
  101. var magamyn = model.getValue("/root/magam/magamyn");
  102. if(magamyn == "Y"){
  103. cap_magam.value = "해당부서는 현재 마감되어있습니다.";
  104. rdo_workyn.value = "N"
  105. }else{
  106. cap_magam.value = "";
  107. rdo_workyn.value = "Y"
  108. }//if(magamyn == "Y"){
  109. }else{
  110. return;
  111. }//if(submit("TRRSO21002")){
  112. }//if(endyn == "Y"){
  113. }else{
  114. return;
  115. }//if(submit("TRRSO21003")){
  116. }
  117. function reEndDeptList(){
  118. if(submit("TRRSO20502")){
  119. var magamyn = "";
  120. for(var i = 1 ; i < grd_magam.rows ; i++){
  121. magamyn = grd_magam.valueMatrix(i, grd_magam.colRef("magamyn"));
  122. if(magamyn == "Y"){
  123. grd_magam.cellStyle("background-color", i, 1, i, 2) = "#ccffff";
  124. }else{
  125. grd_magam.cellStyle("background-color", i, 1, i, 2) = "#ffff99";
  126. }
  127. }
  128. }
  129. }
  130. ]]>
  131. </script>
  132. </xhtml:head>
  133. <xhtml:body pagewidth="770" pageheight="500" guideline="1,1368;" style="font-family:굴림; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  134. <group id="group1" style="left:0px; top:0px; width:745px; height:13px; ">
  135. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">월마감(부서재고)</caption>
  136. </group>
  137. <group id="group3" scroll="auto" style="left:0px; top:40px; width:745px; height:442px; ">
  138. <line id="line1" class="line_1" style="x1:0px; y1:38px; x2:400px; y2:38px; "/>
  139. <caption id="caption1" class="tit_2" style="left:0px; top:19px; width:180px; height:14px; ">부서재고 월마감 작업</caption>
  140. <line id="line2" class="line_1" style="x1:0px; y1:148px; x2:400px; y2:148px; "/>
  141. <caption id="caption26" class="cell_1" style="left:0px; top:96px; width:110px; height:23px; text-align:center; vertical-align:middle; ">부 서</caption>
  142. <line id="line3" class="line_2" style="x1:0px; y1:94px; x2:270px; y2:94px; "/>
  143. <line id="line4" class="line_2" style="x1:0px; y1:94px; x2:400px; y2:94px; "/>
  144. <line id="line5" class="line_2" style="x1:0px; y1:120px; x2:400px; y2:120px; "/>
  145. <caption id="cap_purccondd" class="cell_1" style="left:0px; top:44px; width:110px; height:23px; text-align:center; vertical-align:middle; ">기관코드</caption>
  146. <caption id="caption5" class="cell_1" style="left:0px; top:70px; width:110px; height:23px; text-align:center; vertical-align:middle; ">마감년월</caption>
  147. <caption id="cap_concmpycd1" class="cell_1" style="left:0px; top:122px; width:110px; height:23px; text-align:center; vertical-align:middle; ">작업구분</caption>
  148. <line id="line10" class="line_2" style="x1:0px; y1:68px; x2:400px; y2:68px; "/>
  149. <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_default" disabled="true" navindex="1" appearance="minimal" style="left:112px; top:46px; width:143px; height:19px; ">
  150. <choices>
  151. <itemset nodeset="/root/main/init">
  152. <label ref="cnstnm"/>
  153. <value ref="cnstcd"/>
  154. </itemset>
  155. </choices>
  156. </select1>
  157. <input id="ipt_endmonth" ref="/root/send/search/endmonth" navindex="5" inputtype="date" format="yyyy-mm" style="left:112px; top:72px; width:143px; height:19px; ">
  158. <script type="javascript" ev:event="xforms-value-changed">
  159. <![CDATA[
  160. model.setValue("/root/send/magamsearch/instcd", cmb_instcd.value);
  161. model.setValue("/root/send/magamsearch/dd", ipt_endmonth.value);
  162. model.setValue("/root/send/magamsearch/deptcd", ipt_deptcd.value);
  163. reMagamYN(); //물류마감,해당부서 마감여부조회
  164. reEndDeptList();//마감부서리스트 조회
  165. ]]>
  166. </script>
  167. </input>
  168. <select1 id="rdo_workyn" ref="/root/send/search/workyn" appearance="full" cols="2" overflow="visible" style="left:114px; top:126px; width:145px; height:20px; border-style:none; ">
  169. <choices>
  170. <item>
  171. <label>마감작업</label>
  172. <value>Y</value>
  173. </item>
  174. <item>
  175. <label>마감취소</label>
  176. <value>N</value>
  177. </item>
  178. </choices>
  179. </select1>
  180. <input id="ipt_deptcd" ref="/root/send/search/deptcd" class="input_default" navindex="2" style="left:112px; top:98px; width:70px; height:19px; ">
  181. <script type="javascript" ev:event="xforms-value-changed">
  182. <![CDATA[
  183. misfValidationCheck("02", "", "deptcd,deptnm" );
  184. ipt_deptcd.refresh();
  185. opt_deptnm.refresh();
  186. //조회조건 변경시 초기화 및 check
  187. //fSearchCondChanged("ipt_deptcd");
  188. if(distriyn == "Y"){
  189. return;
  190. }
  191. if(opt_deptnm.value != ""){
  192. model.setValue("/root/send/magamsearch/instcd", cmb_instcd.value);
  193. model.setValue("/root/send/magamsearch/dd", ipt_endmonth.value);
  194. model.setValue("/root/send/magamsearch/deptcd", ipt_deptcd.value);
  195. if(submit("TRRSO21002")){
  196. var magamyn = model.getValue("/root/magam/magamyn");
  197. if(magamyn == "Y"){
  198. cap_magam.value = "해당부서는 현재 마감되어있습니다.";
  199. }else{
  200. cap_magam.value = "";
  201. }
  202. }else{
  203. return;
  204. }
  205. }
  206. ]]>
  207. </script>
  208. </input>
  209. <output id="opt_deptnm" ref="/root/send/search/deptnm" class="output_fix" appearance="output" style="left:202px; top:98px; width:188px; height:19px; "/>
  210. <button id="btn_deptcd" class="icon_search" navindex="3" style="left:184px; top:100px; width:16px; height:16px; ">
  211. <caption/>
  212. <script type="javascript" ev:event="DOMActivate">
  213. <![CDATA[
  214. var recv_list = "deptcd,deptnm";
  215. misfOpenPopUpList("02", ipt_deptcd,"", recv_list) ;
  216. ipt_deptcd.refresh();
  217. opt_deptnm.refresh();
  218. if(distriyn == "Y"){
  219. return;
  220. }
  221. if(opt_deptnm.value != ""){
  222. model.setValue("/root/send/magamsearch/instcd", cmb_instcd.value);
  223. model.setValue("/root/send/magamsearch/dd", ipt_endmonth.value);
  224. model.setValue("/root/send/magamsearch/deptcd", ipt_deptcd.value);
  225. if(submit("TRRSO21002")){
  226. var magamyn = model.getValue("/root/magam/magamyn");
  227. if(magamyn == "Y"){
  228. cap_magam.value = "해당부서는 현재 마감되어있습니다.";
  229. }else{
  230. cap_magam.value = "";
  231. }
  232. }else{
  233. return;
  234. }
  235. }
  236. ]]>
  237. </script>
  238. </button>
  239. <datagrid id="grd_magam" nodeset="/root/main/magam/magamlist" caption="부서^마감여부" colsep="^" colwidth="184, 100" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:410px; top:0px; width:330px; height:440px; ">
  240. <col ref="deptnm"/>
  241. <col ref="magamyn"/>
  242. </datagrid>
  243. <caption id="cap_magam" style="left:5px; top:155px; width:395px; height:30px; font-size:11pt; font-weight:bold; color:#ff0000; text-align:center; "/>
  244. </group>
  245. <group id="group4" scroll="auto" style="left:0px; top:13px; width:745px; height:27px; ">
  246. <line id="line7" class="line_6" style="x1:0px; y1:25; x2:400px; y2:25; "/>
  247. <button id="btn_exec" class="btn4_letter2" navindex="41" style="left:336px; top:3px; width:56px; height:22px; ">
  248. <caption>실행</caption>
  249. <script type="javascript" ev:event="DOMActivate">
  250. <![CDATA[
  251. //마감년월에 입력된 값이 올바르지 않으면, 마감년월을 선택하라고 alert함
  252. if(ipt_endmonth.value.length < 6) {
  253. messageBox("마감년월이 올바로 선택되지 않았습니다. \n\n먼저 마감년월을 선택하십시요.", "E999", "");
  254. model.setFocus("ipt_endmonth");
  255. return;
  256. }
  257. //부서에 선택된 값이 없으면, 부서를 선택하라고 alert함
  258. if(ipt_deptcd.value == "") {
  259. messageBox("부서가 선택되지 않았습니다. \n\n부서를 선택하십시요.", "E999", "");
  260. model.setFocus("ipt_deptcd");
  261. return;
  262. }
  263. /* 아래의 마감확정에 대한 process는 Himed로 오면서 없어졌음. -> AS_IS 도 2007년 이후 단 1차례만 사용한 이력이 있음
  264. if(rdo_workyn.value == "N") { //N:마감취소
  265. if(submit("TRRSO20401")) {
  266. if(model.getValue("") == "") {
  267. messageBox("이미 마감확정된 월이므로 마감취소를 할 수 없습니다. \n\n정보통신실로 문의하십시요.", "E999", "");
  268. model.setFocus("ipt_endmonth");
  269. return;
  270. }
  271. }
  272. }
  273. */
  274. if(distriyn = "N"){
  275. if(submit("TXRSO20501")){
  276. model.setValue("/root/send/magamsearch/instcd", cmb_instcd.value);
  277. model.setValue("/root/send/magamsearch/dd", ipt_endmonth.value);
  278. model.setValue("/root/send/magamsearch/deptcd", ipt_deptcd.value);
  279. reMagamYN(); //물류마감,해당부서 마감여부조회
  280. reEndDeptList();//마감부서리스트 조회
  281. }
  282. }
  283. ]]>
  284. </script>
  285. </button>
  286. <button id="btn_distriendN" class="btn4_letter6" navindex="41" visibility="hidden" style="left:232px; top:3px; width:104px; height:22px; ">
  287. <caption>물류마감취소</caption>
  288. <script type="javascript" ev:event="DOMActivate">
  289. <![CDATA[
  290. //마감년월에 입력된 값이 올바르지 않으면, 마감년월을 선택하라고 alert함
  291. if(ipt_endmonth.value.length < 6) {
  292. messageBox("마감년월이 올바로 선택되지 않았습니다. \n\n먼저 마감년월을 선택하십시요.", "E999", "");
  293. model.setFocus("ipt_endmonth");
  294. return;
  295. }
  296. model.setValue("/root/send/search/endyn", "N");
  297. if(submit("TXRSO20502")){
  298. if(submit("TRRSO21003")){
  299. var endyn = model.getValue("/root/distrimagam/endyn");
  300. if(endyn == "Y"){
  301. cap_magam.value = "물류마감이 되어있습니다.";
  302. btn_distriendY.disabled = true;
  303. btn_distriendN.disabled = false;
  304. btn_exec.disabled = true;
  305. distriyn = "Y";
  306. }else{
  307. cap_magam.value = "";
  308. btn_distriendY.disabled = false;
  309. btn_distriendN.disabled = true;
  310. btn_exec.disabled = false;
  311. distriyn = "N";
  312. }
  313. }else{
  314. return;
  315. }
  316. }
  317. ]]>
  318. </script>
  319. </button>
  320. <button id="btn_distriendY" class="btn4_letter6" navindex="41" visibility="hidden" style="left:128px; top:3px; width:104px; height:22px; ">
  321. <caption>물류마감작업</caption>
  322. <script type="javascript" ev:event="DOMActivate">
  323. <![CDATA[
  324. //마감년월에 입력된 값이 올바르지 않으면, 마감년월을 선택하라고 alert함
  325. if(ipt_endmonth.value.length < 6) {
  326. messageBox("마감년월이 올바로 선택되지 않았습니다. \n\n먼저 마감년월을 선택하십시요.", "E999", "");
  327. model.setFocus("ipt_endmonth");
  328. return;
  329. }
  330. model.setValue("/root/send/search/endyn", "Y");
  331. if(submit("TXRSO20502")){
  332. if(submit("TRRSO21003")){
  333. var endyn = model.getValue("/root/distrimagam/endyn");
  334. if(endyn == "Y"){
  335. cap_magam.value = "물류마감이 되어있습니다.";
  336. btn_distriendY.disabled = true;
  337. btn_distriendN.disabled = false;
  338. btn_exec.disabled = true;
  339. distriyn = "Y";
  340. }else{
  341. cap_magam.value = "";
  342. btn_distriendY.disabled = false;
  343. btn_distriendN.disabled = true;
  344. btn_exec.disabled = false;
  345. distriyn = "N";
  346. }
  347. }else{
  348. return;
  349. }
  350. }
  351. ]]>
  352. </script>
  353. </button>
  354. </group>
  355. </xhtml:body>
  356. </xhtml:html>