SPRSO20200_청구요구data(경북대).xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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>청구요구 data</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <req>
  11. <reqlist/>
  12. </req>
  13. <reqdetail>
  14. <reqdetaillist>
  15. <goodcd/>
  16. <goodnm/>
  17. <reqqty/>
  18. <deliveqty/>
  19. <instcd/>
  20. <reqflag/>
  21. <wareflag/>
  22. <reqdeptcd/>
  23. <reqdd/>
  24. <reqno/>
  25. <reqseqno/>
  26. <delivedd/>
  27. <deliveno/>
  28. <deliveseq/>
  29. <deliveflag/>
  30. </reqdetaillist>
  31. </reqdetail>
  32. </main>
  33. <send>
  34. <search>
  35. <instcd/>
  36. <reqdd/>
  37. <reqdeptcd/>
  38. <wareflag/>
  39. <reqno/>
  40. <openflag/>
  41. <searchgubun/>
  42. <reqfromdd/>
  43. <reqtodd/>
  44. </search>
  45. </send>
  46. <init/>
  47. <hidden/>
  48. <temp>
  49. <deliveinfo>
  50. <deliveno/>
  51. </deliveinfo>
  52. </temp>
  53. <popdata>
  54. <instcd/>
  55. <wareflag/>
  56. <wareflagnm/>
  57. <delivedd/>
  58. <reqdeptcd/>
  59. <reqdeptnm/>
  60. <openflag/>
  61. <reqddbarcode/>
  62. <reqnobarcode/>
  63. </popdata>
  64. <reqdd>
  65. <reqtodd/>
  66. <reqfromdd/>
  67. </reqdd>
  68. <chk_preyn/>
  69. </root>
  70. </instance>
  71. <script type="javascript" ev:event="xforms-ready">
  72. <![CDATA[
  73. misfGridInit(grd_req);
  74. misfGridInit(grd_reqdetail);
  75. misfMsterDetailSet(grd_req, null, "TRRSO20201" ,"N");
  76. misfMsterDetailSet(grd_reqdetail, grd_req, "TRRSO20202" ,"Y");
  77. //Master 조회를 위한 parameter setting
  78. model.setValue("/root/send/search/instcd", model.getValue("/root/popdata/instcd"));
  79. model.setValue("/root/send/search/wareflag", model.getValue("/root/popdata/wareflag"));
  80. model.setValue("/root/send/search/reqdeptcd", model.getValue("/root/popdata/reqdeptcd"));
  81. /*2013.11.22 박준범 - 정대룡씨가 아래 if문 안에 각각 일자 setting부분을 중복으로 넣어두었기에 이부분은 comment처리함
  82. //2013.07.18 박준범 - 초기 기간을 6개월로 setting
  83. //model.setValue("/root/send/search/reqfromdd", getCurrentDate().toDate().getAddDate(-3, "M").getDateFormat("YYYYMMDD"));
  84. model.setValue("/root/send/search/reqfromdd", getCurrentDate().toDate().getAddDate(-6, "M").getDateFormat("YYYYMMDD"));
  85. model.setValue("/root/send/search/reqtodd", getCurrentDate().substr(0,8) );
  86. //2013.07.18 박준범 - 초기 기간을 6개월로 setting
  87. //model.setValue("/root/reqdd/reqfromdd", getCurrentDate().toDate().getAddDate(-3, "M").getDateFormat("YYYYMMDD"));
  88. //발주관리에서 호출했을경우 사용할 FLAG
  89. */
  90. //2013.11.22 박준범 - 창고출고등록 프로그램에서 청구출급증 바코드를 통해 본 화면이 호출된 경우와 아닌 경우로 나눔
  91. var reqddBar = model.getValue("/root/popdata/reqddbarcode");
  92. if(model.getValue("/root/popdata/openflag") == "SMRSD07600"){
  93. btn_save.attribute("text") = "확인";
  94. model.setValue("/root/send/search/searchgubun", "order");
  95. model.setValue("/root/reqdd/reqfromdd", getCurrentDate().toDate().getAddDate(-1, "M").getDateFormat("YYYYMMDD")); //발주관리에서 조회할경우 청구일자 한달전으로 설정
  96. model.setValue("/root/reqdd/reqtodd", getCurrentDate().substr(0,8) );
  97. model.setValue("/root/send/search/reqfromdd", model.getValue("/root/reqdd/reqfromdd"));
  98. model.setValue("/root/send/search/reqtodd", model.getValue("/root/reqdd/reqtodd"));
  99. chk_preyn.visible = false;
  100. model.refresh();
  101. misfMsterDetailRetrieve();
  102. }else if( reqddBar != "" ) { //2013.11.22 박준범 - 창고출고등록 프로그램에서 청구출급증 바코드를 사용해 본 화면이 호출된 경우
  103. model.setValue("/root/reqdd/reqfromdd", reqddBar);
  104. model.setValue("/root/reqdd/reqtodd", reqddBar);
  105. model.setValue("/root/send/search/reqfromdd", model.getValue("/root/reqdd/reqfromdd"));
  106. model.setValue("/root/send/search/reqtodd", model.getValue("/root/reqdd/reqtodd"));
  107. model.refresh();
  108. if(submit("TRRSO20201")) {
  109. if(grd_req.rows > 1) {
  110. var reqnoBar = model.getValue("/root/popdata/reqnobarcode"); //parent에서 넘어온 바코드리더로 인식된 청구번호
  111. for(var i = 1; i < grd_req.rows; i++) {
  112. if(reqnoBar == grd_req.valueMatrix(i, grd_req.colRef("reqno"))) {
  113. grd_req.row = i;
  114. grd_req.topRow = i;
  115. var bReqnoExist = true; //청구번호가 일치하는 행이 있는지 여부
  116. break;
  117. }
  118. }
  119. if(bReqnoExist == true) {
  120. grd_req.dispatch("onrowchanged"); //상세내역 조회
  121. } else {
  122. messageBox("해당 청구건이 이미 출고등록 되었거나, 혹은 삭제되었습니다.", "I999", "");
  123. }
  124. } else {
  125. messageBox("해당 청구건이 이미 출고등록 되었거나, 혹은 삭제되었습니다.", "I999", "");
  126. }
  127. }
  128. }else{
  129. model.setValue("/root/reqdd/reqfromdd", getCurrentDate().toDate().getAddDate(-6, "M").getDateFormat("YYYYMMDD"));
  130. model.setValue("/root/reqdd/reqtodd", getCurrentDate().substr(0,8) );
  131. model.setValue("/root/send/search/reqfromdd", model.getValue("/root/reqdd/reqfromdd"));
  132. model.setValue("/root/send/search/reqtodd", model.getValue("/root/reqdd/reqtodd"));
  133. model.refresh();
  134. misfMsterDetailRetrieve();
  135. //조회된 자료가 없는 경우 message를 주고 창을 닫는다.
  136. if(grd_req.rows == 1) {
  137. messageBox("해당 창고, 부서에 출고되지 않은 청구data가 존재하지 않습니다..", "I999", "");
  138. opener.model.setFocus("ipt_delivedeptcd");
  139. //btn_cancel.dispatch("onclick");
  140. }
  141. }
  142. ]]>
  143. </script>
  144. <submission id="TRRSO20201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/req"/>
  145. <submission id="TRRSO20202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/reqdetail"/>
  146. <submission id="TXRSO20201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/reqdetail" resultref="/root/temp/deliveinfo"/>
  147. </model>
  148. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  149. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  150. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  151. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  152. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  153. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  154. </xhtml:head>
  155. <xhtml:body pagewidth="794" pageheight="600">
  156. <line id="line8" class="line_1" style="x1:10px; y1:92px; x2:780px; y2:92px; "/>
  157. <caption id="caption20" class="tit_2" style="left:11px; top:77px; width:184px; height:13px; ">청구요구 data</caption>
  158. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:10px; top:10px; width:770px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
  159. <caption id="caption12" class="search_name" style="left:270px; top:19px; width:76px; height:17px; ">청구부서</caption>
  160. <button id="btn_cancel" class="btn4_letter2" style="left:725px; top:565px; width:56px; height:22px; ">
  161. <caption>취소</caption>
  162. <script type="javascript" ev:event="DOMActivate">
  163. <![CDATA[
  164. //저장버튼을 click했는지 아닌지를 나타내는 구분값을 opener에 전달한다.
  165. opener.model.setValue("/root/popreq/saveyn", "N");
  166. window.close();
  167. ]]>
  168. </script>
  169. </button>
  170. <button id="btn_save" class="btn4_letter2" style="left:665px; top:565px; width:56px; height:22px; ">
  171. <caption>저장</caption>
  172. <script type="javascript" ev:event="DOMActivate">
  173. <![CDATA[
  174. if(model.getValue("/root/popdata/openflag") == "SMRSD07600"){
  175. //청구내역이 없는 경우 return;
  176. if(grd_reqdetail.rows == 1) window.close();
  177. //물품코드나 출고량을 입력하지 않은 Row가 있는지 확인한다.
  178. for(var i = 1; i < grd_reqdetail.rows; i++) {
  179. if( grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("deliveqty")) == "" ||
  180. grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("deliveqty")) == ".") {
  181. messageBox("출고량이 입력되지 않았습니다. \n\n먼저 출고량을 입력하십시요.", "E999", ""); //E: 경고
  182. model.setFocus("grd_reqdetail");
  183. grd_reqdetail.row = i;
  184. return;
  185. }
  186. }
  187. for(var i = 1; i < grd_reqdetail.rows; i++) {
  188. opener.model.setValue("/root/popreq/count", grd_reqdetail.rows-1);
  189. model.copyNode(opener.root.popsubdata, "/root/main/reqdetail");
  190. // opener.model.setValue("/root/main/plceord/plceordlist["+i+"]/goodcd", model.getValue("/root/main/reqdetail/reqdetaillist["+i+"]/goodcd")); //물품코드
  191. // opener.model.setValue("/root/main/plceord/plceordlist["+i+"]/goodhngnm", model.getValue("/root/main/reqdetail/reqdetaillist["+i+"]/goodnm")); //물품명
  192. // opener.model.setValue("/root/main/plceord/plceordlist["+i+"]/orderqty", model.getValue("/root/main/reqdetail/reqdetaillist["+i+"]/deliveqty")); //발주수량
  193. }
  194. window.close();
  195. }else{
  196. //청구내역이 없는 경우 return;
  197. if(grd_reqdetail.rows == 1) return;
  198. //물품코드나 출고량을 입력하지 않은 Row가 있는지 확인한다.
  199. for(var i = 1; i < grd_reqdetail.rows; i++) {
  200. if( grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("deliveqty")) == "" ||
  201. grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("deliveqty")) == ".") {
  202. messageBox("출고량이 입력되지 않았습니다. \n\n먼저 출고량을 입력하십시요.", "E999", ""); //E: 경고
  203. model.setFocus("grd_reqdetail");
  204. grd_reqdetail.row = i;
  205. return;
  206. }
  207. }
  208. //출고테이블에 저장을 위해 opener에서 받아온 출고일자(delivedd) 를 setting한다.
  209. for(var i = 1; i < grd_reqdetail.rows; i++) {
  210. model.setValue(grd_reqdetail.nodeset + "[" + i + "]/delivedd", model.getValue("/root/popdata/delivedd"));
  211. var sDeliveSeq = i + "";
  212. model.setValue(grd_reqdetail.nodeset + "[" + i + "]/deliveseq", sDeliveSeq.getLeftPad(3,"0"));
  213. model.setValue(grd_reqdetail.nodeset + "[" + i + "]/deliveflag", "01"); //출고구분 (01:전산청구)
  214. }
  215. //alert(grd_reqdetail.getUpdateDataAll("u"));
  216. //return;
  217. if(chk_preyn.value == "Y"){
  218. for(var i = 1; i < grd_reqdetail.rows; i++) {
  219. grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("preyn")) = "Y";
  220. }
  221. }
  222. //저장처리
  223. if(submit("TXRSO20201")) {
  224. //저장버튼을 click했는지 아닌지를 나타내는 구분값을 opener에 전달한다.
  225. opener.model.setValue("/root/popreq/saveyn", "Y");
  226. //alert(model.getValue("/root/temp/deliveinfo/deliveno")+"");
  227. //return;
  228. //선택한 출고내역을 opener의 조회조건에 setting한다.
  229. opener.model.setValue("/root/send/search/deliveno", model.getValue("/root/temp/deliveinfo/deliveno"));
  230. //opener.model.setValue("/root/send/search/delivedd", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/delivedd"));
  231. opener.model.setValue("/root/send/search/deliveflag", "01"); //출고유형 설정 (01:전산청구)
  232. opener.model.refreshpart("/root/send/search/deliveno");
  233. //opener.model.refreshpart("/root/send/search/delivedd");
  234. opener.model.refreshpart("/root/send/search/deliveflag");
  235. window.close();
  236. }
  237. }
  238. ]]>
  239. </script>
  240. </button>
  241. <caption id="caption3" class="search_name" style="left:55px; top:19px; width:80px; height:17px; ">창고</caption>
  242. <output id="opt_wareflagnm" ref="/root/popdata/wareflagnm" class="output_fix" style="left:110px; top:18px; width:120px; height:19px; text-align:center; padding-left:5; "/>
  243. <output id="opt_reqdeptcd" ref="/root/popdata/reqdeptcd" class="output_fix" style="left:352px; top:18px; width:78px; height:19px; padding-left:5; "/>
  244. <output id="opt_reqdeptnm" ref="/root/popdata/reqdeptnm" class="output_fix" style="left:430px; top:18px; width:225px; height:19px; padding-left:5; "/>
  245. <datagrid id="grd_req" nodeset="/root/main/req/reqlist" visibility="visible" caption="청구일자^번호^창고^청구부서^기관코드^" colwidth="77, 42, 29, 42, 58" mergecellsfixedrows="bycolrec" style="left:10px; top:95px; width:140px; height:465px; ">
  246. <col ref="reqdd" format="yyyy-mm-dd" style="text-align:center; "/>
  247. <col ref="reqno" style="text-align:center; "/>
  248. <col ref="wareflag" visibility="hidden"/>
  249. <col ref="reqdeptcd" visibility="hidden"/>
  250. <col ref="instcd" visibility="hidden"/>
  251. <col ref="searchgubun" visibility="hidden"/>
  252. <script type="javascript" ev:event="onrowchanged">
  253. <![CDATA[
  254. //Detail 조회를 위한 parameter setting
  255. model.setValue("/root/send/search/instcd", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/instcd"));
  256. model.setValue("/root/send/search/reqdd", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/reqdd"));
  257. model.setValue("/root/send/search/reqno", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/reqno"));
  258. model.setValue("/root/send/search/wareflag", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/wareflag"));
  259. model.setValue("/root/send/search/reqdeptcd", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/reqdeptcd"));
  260. model.setValue("/root/send/search/searchgubun", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/searchgubun"));
  261. misfMsterDetailRetrieve();
  262. ]]>
  263. </script>
  264. </datagrid>
  265. <datagrid id="grd_reqdetail" nodeset="/root/main/reqdetail/reqdetaillist" visibility="visible" caption="물품코드^물품명^규격^청구량^출고량^기관코드^물품구분(reqflag)^창고^청구부서^청구일자^청구번호^청구일련번호^출고일자^출고번호^출고순번^출고구분^" colwidth="89, 213, 138, 60, 60, 100, 100, 100, 100, 100, 100, 100, 81, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" style="left:150px; top:95px; width:630px; height:465px; ">
  266. <col ref="goodcd" style="text-align:center; "/>
  267. <col ref="goodnm"/>
  268. <col ref="goodspec"/>
  269. <col ref="reqqty" format="(-)#,###.##" style="left:341px; top:23px; width:76px; height:23px; text-align:right; "/>
  270. <col ref="deliveqty" type="input" format="(-)#,###.##" style="text-align:right; "/>
  271. <col ref="instcd" visibility="hidden"/>
  272. <col ref="reqflag" visibility="hidden"/>
  273. <col ref="wareflag" visibility="hidden"/>
  274. <col ref="reqdeptcd" visibility="hidden"/>
  275. <col ref="reqdd" visibility="hidden"/>
  276. <col ref="reqno" visibility="hidden"/>
  277. <col ref="reqseqno" visibility="hidden"/>
  278. <col ref="delivedd" visibility="hidden"/>
  279. <col ref="deliveno" visibility="hidden"/>
  280. <col ref="deliveseq" visibility="hidden"/>
  281. <col ref="deliveflag" visibility="hidden"/>
  282. <col ref="custcode" visibility="hidden"/>
  283. <col ref="custnm" visibility="hidden"/>
  284. <col ref="allsizespecid" visibility="hidden"/>
  285. <col ref="acntcd" visibility="hidden"/>
  286. <col ref="acntnm" visibility="hidden"/>
  287. <col ref="preyn" visibility="hidden"/>
  288. <col ref="deliveunit" visibility="hidden"/>
  289. <script type="javascript" ev:event="onkeypress">
  290. <![CDATA[
  291. //Grid 에서 엔터 입력시 다음행 수정
  292. misfNextRow(grd_reqdetail);
  293. ]]>
  294. </script>
  295. </datagrid>
  296. <caption id="caption2" style="left:229px; top:44px; width:11px; height:20px; ">~</caption>
  297. <caption id="caption1" class="search_name" style="left:55px; top:45px; width:80px; height:17px; ">청구일자</caption>
  298. <input id="ipt_reqtodd" ref="/root/reqdd/reqtodd" inputtype="date" format="yyyy-mm-dd" style="left:243px; top:44px; width:90px; height:19px; text-align:center; "/>
  299. <input id="ipt_reqfromdd" ref="/root/reqdd/reqfromdd" inputtype="date" format="yyyy-mm-dd" style="left:136px; top:44px; width:90px; height:19px; text-align:center; "/>
  300. <button id="btn_search" class="btn1_letter2" style="left:693px; top:30px; width:56px; height:22px; ">
  301. <caption>조회</caption>
  302. <script type="javascript" ev:event="DOMActivate">
  303. <![CDATA[
  304. misfGridInit(grd_req);
  305. misfGridInit(grd_reqdetail);
  306. model.setValue("/root/send/search/reqfromdd", model.getValue("/root/reqdd/reqfromdd"));
  307. model.setValue("/root/send/search/reqtodd", model.getValue("/root/reqdd/reqtodd"));
  308. //발주관리에서 호출했을경우 사용할 FLAG
  309. if(model.getValue("/root/popdata/openflag") == "SMRSD07600"){
  310. btn_save.attribute("text") = "확인";
  311. model.setValue("/root/send/search/searchgubun", "order");
  312. }
  313. misfMsterDetailRetrieve();
  314. ]]>
  315. </script>
  316. </button>
  317. <line id="line13" class="line_4" style="x1:680px; y1:20px; x2:680px; y2:62px; "/>
  318. <select id="chk_preyn" ref="/root/chk_preyn" visibility="visible" overflow="visible" appearance="full" style="left:592px; top:568px; width:75px; height:20px; border-style:none; ">
  319. <choices>
  320. <item>
  321. <label>선납출고</label>
  322. <value>Y</value>
  323. </item>
  324. </choices>
  325. </select>
  326. </xhtml:body>
  327. </xhtml:html>