SMRSD06400_정량보충청구관리.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  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. <goodreq>
  11. <goodgareqlist/>
  12. </goodreq>
  13. </main>
  14. <send>
  15. <save>
  16. <goodreq>
  17. <goodgareqlist/>
  18. </goodreq>
  19. </save>
  20. <goodreq>
  21. <instcd/>
  22. <goodflag/>
  23. <goodcd/>
  24. <goodnm/>
  25. <reqfrdd/>
  26. <reqtodd/>
  27. <reqdeptcd/>
  28. <reqdeptnm/>
  29. <reqmthdflag/>
  30. <ifstatus/>
  31. </goodreq>
  32. </send>
  33. <init>
  34. <ifstatus>
  35. <label>전체</label>
  36. <value/>
  37. <label>청구</label>
  38. <value>S</value>
  39. <label>미청구</label>
  40. <value>C</value>
  41. </ifstatus>
  42. <totcnt/>
  43. <reqcnt/>
  44. <nonreqcnt/>
  45. </init>
  46. <hidden/>
  47. <temp/>
  48. </root>
  49. </instance>
  50. <script type="javascript" ev:event="xforms-ready">
  51. <![CDATA[
  52. //화면 Control을 초기화한다
  53. fCheckAuth();
  54. fInitialize();
  55. ]]>
  56. </script>
  57. <submission id="TRRSD06401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/goodreq"/>
  58. <submission id="TXRSD06401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save/goodreq" resultref="/root/temp"/>
  59. </model>
  60. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  62. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  63. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  66. <script type="javascript">
  67. <![CDATA[
  68. function fInitialize() {
  69. model.resetInstanceNode("/root/send");
  70. misfGridInit(grd_goodreq);
  71. //rszfUserGoodFlagList(cmb_goodflag,getUserInfo("userid"));
  72. rszfGoodFlagListByPgmGubn(cmb_goodflag,"1","N");
  73. rszfUserReqInstList(cmb_instcd,getUserInfo("userid"),"%","B");
  74. misfMsterDetailSet(grd_goodreq,null, "TRRSD06401" ,"Y");
  75. model.setValue(cmb_instcd.attribute("ref"), getUserInfo("dutplceinstcd"));
  76. var curdate = getCurrentDate();
  77. var cvtdate = curdate.toDate("YYYYMMDD").getAddDate(-10,"D").getDateFormat("YYYYMMDD");
  78. model.setValue(ipt_reqfrdd.attribute("ref") ,cvtdate);
  79. model.setValue(ipt_reqtodd.attribute("ref") , curdate);
  80. // hidden col
  81. model.setValue(opt_reqmthd.attribute("ref") , "2"); // 정량보충
  82. model.refresh();
  83. }
  84. function fCheckAuth() {
  85. btn_search.disabled = !checkAuth("R") ;
  86. btn_save.disabled = !checkAuth("X") ;
  87. }
  88. function fCheckRetrieveData(pmsg) {
  89. if (model.getValue(cmb_instcd.attribute("ref")).length== 0 ) {
  90. if(pmsg == true) {
  91. messageBox("기관코드를 " ,"C002");
  92. model.setFocus("cmb_instcd");
  93. }
  94. return false;
  95. }
  96. if (model.getValue(ipt_reqfrdd.attribute("ref")).length== 0 ) {
  97. if(pmsg == true) {
  98. messageBox("청구시작일자를 " ,"C001");
  99. model.setFocus("ipt_reqfrdd");
  100. }
  101. return false;
  102. }
  103. if (model.getValue(ipt_reqtodd.attribute("ref")).length== 0 ) {
  104. if(pmsg == true) {
  105. messageBox("청구종료일자를" ,"C001");
  106. model.setFocus("ipt_reqtodd");
  107. }
  108. return false;
  109. }
  110. return true;
  111. }
  112. function fCheckSaveData() {
  113. if(model.getValue(cmb_instcd.attribute("ref")).length== 0) {
  114. messageBox("기관코드를 " ,"C002");
  115. model.setFocus("cmb_instcd");
  116. return false;
  117. }
  118. return true;
  119. }
  120. /* 가청구건수 조회*/
  121. function fAfterRetrieve() {
  122. var ptotcnt = 0;
  123. var preqcnt = 0;
  124. var pnonreqcnt = 0;
  125. for(var currow = grd_goodreq.fixedRows ; currow < grd_goodreq.rows ; currow++) {
  126. ptotcnt = ptotcnt + 1;
  127. if (grd_goodreq.valueMatrix(currow , grd_goodreq.colRef("ifstatus")) == "S") preqcnt = preqcnt + 1;
  128. if (grd_goodreq.valueMatrix(currow , grd_goodreq.colRef("ifstatus")) == "C") pnonreqcnt = pnonreqcnt + 1;
  129. }
  130. model.setValue(opt_totcnt.attribute("ref"),ptotcnt);
  131. model.setValue(opt_reqcnt.attribute("ref"),preqcnt);
  132. model.setValue(opt_nonreqcnt.attribute("ref"),pnonreqcnt);
  133. model.refresh();
  134. }
  135. ]]>
  136. </script>
  137. </xhtml:head>
  138. <xhtml:body guideline="2,774;1,143;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  139. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  140. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">정량보충 청구관리</caption>
  141. </group>
  142. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  143. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195px; height:70px; "/>
  144. <select1 id="cmb_instcd" ref="/root/send/goodreq/instcd" class="combo_s_essential" appearance="minimal" style="left:100px; top:18; width:120; height:19px; ">
  145. <choices>
  146. <itemset nodeset="/root/init/instcd">
  147. <label ref="cdnm"/>
  148. <value ref="cdid"/>
  149. </itemset>
  150. </choices>
  151. </select1>
  152. <caption id="caption5" class="search_name" style="left:767px; top:20px; width:101px; height:17px; ">물품코드 :</caption>
  153. <select1 id="cmb_goodflag" ref="/root/send/goodreq/goodflag" class="combo_s_essential" appearance="minimal" style="left:465px; top:18px; width:150px; height:19px; ">
  154. <choices>
  155. <itemset nodeset="/root/init/goodflag">
  156. <label ref="cdnm"/>
  157. <value ref="cdid"/>
  158. </itemset>
  159. </choices>
  160. <script type="javascript" ev:event="xforms-value-changed">
  161. <![CDATA[
  162. btn_search.dispatch("DOMActivate");
  163. ]]>
  164. </script>
  165. </select1>
  166. <caption id="caption7" class="search_name" style="left:380px; top:19px; width:86px; height:17px; ">물품구분 :</caption>
  167. <input id="ipt_reqfrdd" ref="/root/send/goodreq/reqfrdd" class="input_s_essential" inputtype="date" style="left:100px; top:45px; width:120px; height:19px; ">
  168. <script type="javascript" ev:event="xforms-value-changed">
  169. <![CDATA[
  170. btn_search.dispatch("DOMActivate");
  171. ]]>
  172. </script>
  173. </input>
  174. <input id="ipt_reqtodd" ref="/root/send/goodreq/reqtodd" class="input_s_essential" inputtype="date" style="left:240px; top:45px; width:126px; height:19px; ">
  175. <script type="javascript" ev:event="xforms-value-changed">
  176. <![CDATA[
  177. btn_search.dispatch("DOMActivate");
  178. ]]>
  179. </script>
  180. </input>
  181. <caption id="caption23" style="left:225px; top:45px; width:15px; height:20px; font-weight:bold; vertical-align:middle; ">~</caption>
  182. <button id="btnselect" class="btn2_letter7" visibility="hidden" style="left:1030px; top:85px; width:97px; height:19px; ">
  183. <caption>전체선택/취소</caption>
  184. <script type="javascript" ev:event="DOMActivate">
  185. <![CDATA[
  186. for(var liRow = grd_goodreq.fixedRows; liRow < grd_goodreq.rows ; liRow++) {
  187. if(grd_goodreq.valueMatrix(liRow,grd_goodreq.colRef("ifstatus")) == "S") {
  188. model.setValue(grd_goodreq.nodeset + "[" + (liRow - grd_goodreq.fixedRows + 1) + "]/ifstatus" , "C");
  189. grd_goodreq.rowStatus(liRow) = "2";
  190. } else {
  191. model.setValue(grd_goodreq.nodeset + "[" + (liRow - grd_goodreq.fixedRows + 1) + "]/ifstatus" , "S");
  192. grd_goodreq.rowStatus(liRow) = "2";
  193. }
  194. }
  195. model.refresh();
  196. ]]>
  197. </script>
  198. </button>
  199. <button id="btn_reqdeptcd" class="icon_search" style="left:551px; top:45px; width:16px; height:16px; ">
  200. <caption/>
  201. <script type="javascript" ev:event="DOMActivate">
  202. <![CDATA[
  203. var recv_list = "reqdeptcd,reqdeptnm";
  204. misfOpenPopUpList("02", ipt_reqdeptcd,"",recv_list);
  205. model.refresh();
  206. btn_search.dispatch("DOMActivate");
  207. ]]>
  208. </script>
  209. </button>
  210. <input id="ipt_reqdeptnm" ref="/root/send/goodreq/reqdeptnm" class="input_search" style="left:571px; top:45px; width:139px; height:19px; ">
  211. <script type="javascript" ev:event="xforms-value-changed">
  212. <![CDATA[
  213. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  214. model.refresh();
  215. ]]>
  216. </script>
  217. </input>
  218. <input id="ipt_reqdeptcd" ref="/root/send/goodreq/reqdeptcd" class="input_search" appearance="input" style="left:465px; top:45px; width:82px; height:19px; ">
  219. <script type="javascript" ev:event="xforms-value-changed">
  220. <![CDATA[
  221. misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
  222. model.refresh();
  223. ]]>
  224. </script>
  225. </input>
  226. <datagrid id="grd_goodreq" nodeset="/root/main/goodreq/goodgareqlist" visibility="visible" caption="NO^가청구일자^청구부서^물품코드^물품명^규격^모델^포장단위^청구량^청구^부서검수자명^검수자확인^주거래처명^보조거래처명" colsep="^" colwidth="39, 77, 88, 69, 292, 134, 101, 87, 57, 54, 100, 100, 100, 100, 57, 55, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:113px; width:1195px; height:623px; ">
  227. <col ref="rowno" style="text-align:right; "/>
  228. <col ref="gareqdd" format="yyyy-mm-dd" style="text-align:center; "/>
  229. <col ref="reqdeptnm" type="output"/>
  230. <col ref="goodcd" style="text-align:center; "/>
  231. <col ref="goodnm"/>
  232. <col ref="goodspec" type="output"/>
  233. <col ref="goodmodel" type="output"/>
  234. <col ref="setunit" style="text-align:right; "/>
  235. <col ref="reqqty" format="#,###" style="text-align:right; "/>
  236. <col checkvalue="S,C" disabled="true" ref="ifstatus" type="checkbox"/>
  237. <col ref="acptpsnnm"/>
  238. <col ref="hisacptpsnnm"/>
  239. <col ref="suplplcecdnm"/>
  240. <col ref="suppcustcdnm"/>
  241. <col ref="gareqno" visibility="hidden"/>
  242. <col ref="gareqseqno" visibility="hidden"/>
  243. <col ref="instcd" visibility="hidden"/>
  244. <col ref="reqflag" visibility="hidden"/>
  245. <col ref="reqdd" visibility="hidden" format="yyyy-mm-dd"/>
  246. <col ref="reqno" visibility="hidden"/>
  247. <col ref="reqseqno" visibility="hidden"/>
  248. <col ref="reqmthdflag" visibility="hidden"/>
  249. <col ref="reqpridflag" visibility="hidden"/>
  250. <col ref="reqdeptcd" visibility="hidden"/>
  251. <col ref="requnit" visibility="hidden"/>
  252. <col ref="reqpsnid" visibility="hidden"/>
  253. <col ref="reqtm" visibility="hidden"/>
  254. <col ref="goodcd" visibility="hidden"/>
  255. <col ref="goodflag" visibility="hidden"/>
  256. <col ref="workflag" visibility="hidden"/>
  257. <col ref="allsizespecid" visibility="hidden"/>
  258. <col ref="mainmngtdeptcd" visibility="hidden"/>
  259. <col ref="deliveunit" visibility="hidden"/>
  260. <col ref="maincustlastsuplplce" visibility="hidden"/>
  261. <col ref="ifid" visibility="hidden"/>
  262. <col ref="ifsnddt" visibility="hidden"/>
  263. <col ref="ifcmd" visibility="hidden"/>
  264. <col ref="ifrsvdt" visibility="hidden"/>
  265. <col ref="preifstatus" visibility="hidden"/>
  266. <script type="javascript" ev:event="onaftersort">
  267. <![CDATA[
  268. grd_goodreq.gridToInstance();
  269. ]]>
  270. </script>
  271. <script type="javascript" ev:event="xforms-value-changed">
  272. <![CDATA[
  273. if(grd_goodreq.col == grd_goodreq.colRef("ifstatus") ) {
  274. if( grd_goodreq.valueMatrix(grd_goodreq.row, grd_goodreq.colRef("ifstatus")) == 'S' ) {
  275. model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/reqdd", model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/gareqdd") );
  276. }
  277. //if (model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/reqdd") == "") model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/reqdd", model.getValue(ipt_reqfrdd.attribute("ref")));
  278. //if (model.getValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/reqdeptcd") == "") model.setValue(grd_goodreq.nodeset + "[" + (grd_goodreq.row - grd_goodreq.fixedRows + 1) + "]/reqdeptcd" ,model.getValue(ipt_reqdeptcd.attribute("ref")));
  279. }
  280. ]]>
  281. </script>
  282. </datagrid>
  283. <select1 id="cmb_ifstatus" ref="/root/send/goodreq/ifstatus" class="combo_search" appearance="minimal" style="left:859px; top:45px; width:120px; height:19px; ">
  284. <choices>
  285. <itemset nodeset="/root/init/ifstatus">
  286. <label ref="label"/>
  287. <value ref="value"/>
  288. </itemset>
  289. </choices>
  290. <script type="javascript" ev:event="xforms-value-changed">
  291. <![CDATA[
  292. btn_search.dispatch("DOMActivate");
  293. ]]>
  294. </script>
  295. </select1>
  296. <line id="line14" class="line_4" style="x1:1110px; y1:19px; x2:1110px; y2:71px; "/>
  297. <caption id="caption14" class="search_name" style="left:15; top:19; width:86px; height:17px; ">기관코드 :</caption>
  298. <caption id="cap_ifstatus" class="search_name" style="left:767px; top:46px; width:138px; height:17px; ">청구처리 :</caption>
  299. <caption id="cap_reqdeptcd" class="search_name" style="left:380px; top:45px; width:94px; height:17px; ">청구부서 :</caption>
  300. <caption id="caption24" class="search_name" style="left:15px; top:46px; width:86px; height:17px; ">청구일자 :</caption>
  301. <line id="line1" class="line_1" style="x1:0px; y1:107px; x2:1195px; y2:107px; "/>
  302. <caption id="caption4" class="tit_2" style="left:5px; top:92px; width:170px; height:13px; ">정량보충 청구내역</caption>
  303. <output id="opt_reqmthd" ref="/root/send/goodreq/reqmthdflag" visibility="hidden" style="left:990px; top:46px; width:35px; height:19px; "/>
  304. <button id="btn_excel" class="btn2_letter3" style="left:1142px; top:85px; width:53px; height:19px; ">
  305. <caption>Excel</caption>
  306. <script type="javascript" ev:event="DOMActivate">
  307. <![CDATA[
  308. misfSaveExcel(grd_goodreq);
  309. ]]>
  310. </script>
  311. </button>
  312. <output id="opt_totcnt" ref="/root/init/totcnt" style="left:735px; top:85px; width:50px; height:19px; font-weight:bold; text-align:right; "/>
  313. <caption id="cap_reqqtytotal" style="left:670px; top:85px; width:65px; height:23px; font-weight:bold; vertical-align:middle; ">조회건수 :</caption>
  314. <output id="opt_reqcnt" ref="/root/init/reqcnt" style="left:861px; top:85px; width:39px; height:19px; font-weight:bold; text-align:right; "/>
  315. <caption id="caption1" style="left:796px; top:85px; width:65px; height:23px; font-weight:bold; vertical-align:middle; ">청구건수 :</caption>
  316. <caption id="caption2" style="left:910px; top:85px; width:103px; height:23px; font-weight:bold; vertical-align:middle; ">미청구건수 :</caption>
  317. <output id="opt_nonreqcnt" ref="/root/init/nonreqcnt" style="left:985px; top:85px; width:39px; height:19px; font-weight:bold; text-align:right; "/>
  318. <input id="ipt_goodnm" ref="/root/send/goodreq/goodnm" class="input_search" style="left:960px; top:20px; width:135px; height:19px; ">
  319. <script type="javascript" ev:event="xforms-value-changed">
  320. <![CDATA[
  321. if(ipt_goodnm.value != "") {
  322. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,reqflag,goodnm,nonusegoodview",
  323. "goodnm," + cmb_instcd.value + "," + opt_reqflag.value + "," + ipt_goodnm.value + "," + rdo_nonusegoodview.value ,"","goodcd,goodnm",
  324. ipt_goodcd,"SPRSD00210","instcd,reqflag","opt_instcd,opt_reqflag");
  325. } else {
  326. ipt_goodcd.value = "";
  327. ipt_goodnm.value = "";
  328. }
  329. model.refresh();
  330. ]]>
  331. </script>
  332. </input>
  333. <input id="ipt_goodcd" ref="/root/send/goodreq/goodcd" class="input_search" style="left:859px; top:20px; width:81px; height:19px; text-align:center; ">
  334. <script type="javascript" ev:event="xforms-value-changed">
  335. <![CDATA[
  336. if(ipt_goodcd.value != "") {
  337. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,reqflag,goodcd,nonusegoodview",
  338. "goodcd," + cmb_instcd.value + "," + opt_reqflag.value + "," + ipt_goodcd.value + "," + rdo_nonusegoodview.value,"","goodcd,goodnm",
  339. ipt_goodcd,"SPRSD00210","instcd,reqflag","opt_instcd,opt_reqflag");
  340. } else {
  341. ipt_goodcd.value = "";
  342. ipt_goodnm.value = "";
  343. }
  344. model.refresh();
  345. ]]>
  346. </script>
  347. </input>
  348. <button id="btn_goodSearchs" class="icon_search" style="left:942px; top:20px; width:16px; height:16px; ">
  349. <caption/>
  350. <script type="javascript" ev:event="DOMActivate">
  351. <![CDATA[
  352. // 물품코드 팝업창 오픈
  353. rszfOpenPopUpListByWndName(ipt_goodcd,"","goodcd,goodnm","SPRSD00210","instcd,goodflag","cmb_instcd,cmb_goodflag");
  354. model.refresh();
  355. ]]>
  356. </script>
  357. </button>
  358. <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1125px; top:35px; width:56px; height:22px; text-align:left; ">
  359. <caption>조회</caption>
  360. <script type="javascript" ev:event="DOMActivate">
  361. <![CDATA[
  362. if(fCheckRetrieveData(false) == false)return;
  363. misfMsterDetailRetrieve();
  364. fAfterRetrieve();
  365. ]]>
  366. </script>
  367. </button>
  368. </group>
  369. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  370. <button id="btn_print" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  371. <caption>출력</caption>
  372. </button>
  373. <button id="btn_save" class="btn4_letter2" visibility="hidden" style="left:1069px; top:3px; width:56px; height:22px; ">
  374. <caption>저장</caption>
  375. <script type="javascript" ev:event="DOMActivate">
  376. <![CDATA[
  377. if(fCheckSaveData() == false)return;
  378. model.setValue("/root/send/save/goodreq/goodgareqlist", grd_goodreq.getUpdateData());
  379. submit("TXRSD06401");
  380. //if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
  381. ]]>
  382. </script>
  383. </button>
  384. <button id="btn_init" class="btn4_letter3" style="left:1126px; top:3px; width:68px; height:22px; ">
  385. <caption>초기화</caption>
  386. <script type="javascript" ev:event="DOMActivate">
  387. <![CDATA[
  388. fInitialize();
  389. ]]>
  390. </script>
  391. </button>
  392. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
  393. </group>
  394. </xhtml:body>
  395. </xhtml:html>