SMMNG03402_린넨일일마감관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  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. <lnedinfo>
  11. <lnedlist>
  12. </lnedlist>
  13. </lnedinfo>
  14. </main>
  15. <send>
  16. <instcdnm/>
  17. <reqdd/>
  18. <gubuncd>01</gubuncd>
  19. <lnedflag/>
  20. <cdgrupid>T67</cdgrupid>
  21. <cdgrupid1>T64</cdgrupid1>
  22. <deptcd/>
  23. <flag>1</flag>
  24. <reqtodd/>
  25. </send>
  26. <cond>
  27. <reqdd/>
  28. <selyymmdd>DD</selyymmdd>
  29. </cond>
  30. <init>
  31. <grupcdinfo/>
  32. <csrdeptlist/>
  33. <lnedinfo/>
  34. </init>
  35. <hidden>
  36. <setvalue>
  37. <cdid/>
  38. </setvalue>
  39. </hidden>
  40. <send1>
  41. <cdgrupid>T65</cdgrupid>
  42. </send1>
  43. </root>
  44. </instance>
  45. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  46. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. fInitialize();
  51. ]]>
  52. </script>
  53. <submission id="TRMNG02305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/grupcdinfo"/>
  54. <submission id="TRMNG02306" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/grupcdinfo1"/>
  55. <submission id="TRMNG00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/csrdeptlist"/>
  56. <submission id="TRMNG03403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/lnedinfo"/>
  57. <submission id="TRMNG03404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/lnedinfo"/>
  58. <submission id="TXMNG03402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/lnedinfo" resultref="/root/temp"/>
  59. <submission id="TRMSG04004" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send1" resultref="/root/hidden"/>
  60. </model>
  61. <script type="javascript">
  62. <![CDATA[
  63. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  64. function fInitialize()
  65. {
  66. model.setValue(opt_instcdnm.attribute("ref"), getUserInfo("dutplceinstnm")); //기관코드
  67. // 마감업무는 전일 청구 불출 내역에 대한 작업이므로 청구일자를 전일로 셋팅한다.
  68. var da = getCurrentDate();
  69. var dat = ((da.toDate("YYYYMMDD")).getAddDate(-1, "D")).getDateFormat("YYYYMMDD") ;
  70. model.setValue(ipt_reqdd.attribute("ref"), dat);
  71. model.setValue(ipt_reqtodd.attribute("ref"), dat);
  72. grd_lnedlist.colDisabled(grd_lnedlist.colRef("lnedflag") ) = true;
  73. grd_lnedlist.colDisabled(grd_lnedlist.colRef("deptcd") ) = true;
  74. grd_lnedlist.colDisabled(grd_lnedlist.colRef("lnrqflag") ) = true;
  75. // CSR 청구부서, 린넨청구부서 가져오기
  76. submit("TRMNG00402");
  77. // 공통코드 가져오기(T67) => 마감구분
  78. submit("TRMNG02305");
  79. // 공통코드 가져오기(T64) => 마감구분
  80. submit("TRMNG02306");
  81. addComboItem("cmb_deptcd","--전체--","","above");
  82. addComboItem("rdo_lnedflag","전체","","above");
  83. // 마감구분 초기 셋팅 : 마감전
  84. rdo_lnedflag.value = "B";
  85. model.refresh();
  86. fSearch();
  87. grd_lnedlist.colDisabled(grd_lnedlist.colRef("erflag")) = true;
  88. model.makeNode("/root/send1/workdd");
  89. model.setValue("/root/send1/workdd", getCurrentDate());
  90. submit("TRMSG04004");
  91. var pord = model.getValue("/root/hidden/setvalue/cdid");
  92. var userid = getUserInfo("userid");
  93. if(userid="ENR") {
  94. btn_sav.disabled = false;
  95. } else {
  96. if (pord == userid) {
  97. btn_sav.disabled = false;
  98. } else {
  99. btn_sav.disabled = true;
  100. }
  101. }
  102. }
  103. function fSearch() {
  104. submit("TRMNG03403");
  105. fStyleChk();
  106. }
  107. function fStyleChk() {
  108. for ( i = grd_lnedlist.fixedRows; i < grd_lnedlist.rows; i++ ) {
  109. if ( grd_lnedlist.valueMatrix(i, grd_lnedlist.colRef("lnrqflag")) == "06" ) {
  110. grd_lnedlist.cellStyle("background-color", i, grd_lnedlist.colRef("lnrqflag")) = "#99CC00";
  111. } else {
  112. grd_lnedlist.cellStyle("background-color", i, grd_lnedlist.colRef("lnrqflag")) = "#FFFFFF";
  113. }
  114. if ( grd_lnedlist.valueMatrix(i, grd_lnedlist.colRef("erflag")) == "Y" ) {
  115. grd_lnedlist.cellStyle("background-color", i, grd_lnedlist.colRef("erflag")) = "#FF6600";
  116. } else {
  117. grd_lnedlist.cellStyle("background-color", i, grd_lnedlist.colRef("erflag")) = "#FFFFFF";
  118. }
  119. }
  120. }
  121. function fPrintRex() {
  122. submit("TRMNG03402");
  123. model.makeNode("/root/send/report/csmtrexinfo");
  124. copyNodesetType("/root/send/report/csmtrexinfo", "/root/main/whiorexinfo");
  125. exeReportPreview("RPMNG03400", "XMLSTR", "/root/send/report/csmtrexinfo");
  126. }
  127. ]]>
  128. </script>
  129. </xhtml:head>
  130. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1210;2,756;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  131. <group id="grp_tle" style="left:0px; top:0px; width:1185px; height:13px; ">
  132. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">린넨 일일마감 관리</caption>
  133. </group>
  134. <group id="grp_biz" scroll="auto" style="left:0px; top:60px; width:1185px; height:655px; ">
  135. <caption id="caption12" class="tit_2" style="left:5px; top:9px; width:138px; height:14px; ">린넨 일일마감 관리</caption>
  136. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:1185px; y2:26px; "/>
  137. <button id="btn_sav" class="btn5_letter2" style="left:1135px; top:3px; width:42px; height:19px; ">
  138. <caption>마감</caption>
  139. <script type="javascript" ev:event="DOMActivate">
  140. <![CDATA[
  141. // 청구일자에 해당하는 내역중 수령까지 완료되지 않은 청구내역이 있는지 확인
  142. submit("TRMNG03404");
  143. var result = model.getValue("/root/init/lnedinfo/result");
  144. // 청구일자에 해당하는 미확정 내역이 존재하면 마감 작업을 멈추고 미확정 내역을 보여준다.
  145. if ( result == "Y" ) {
  146. rdo_lnedflag.value = "E";
  147. fSearch();
  148. } else {
  149. // 미확정 내역이 없으면 마감작업을 진행한다.
  150. // 마감시 청구관리 테이블(mnghlnrq)에 마감구분을 'A'로 업데이트, 마감관리테이블(mnrqlned)에 마감내역 insert
  151. for ( i = grd_lnedlist.fixedRows; i < grd_lnedlist.rows; i++ ) {
  152. grd_lnedlist.rowStatus(i) = 1;
  153. }
  154. model.makeValue("/root/send/lnedinfo/lnedlist", getGridUpdateData(grd_lnedlist));
  155. submit("TXMNG03402");
  156. }
  157. fSearch();
  158. ]]>
  159. </script>
  160. </button>
  161. <datagrid id="grd_lnedlist" nodeset="/root/main/lnedinfo/lnedlist" class="datagrid2" visibility="visible" caption="마감구분^응급여부^부서코드^청구일자^물품코드^상세코드^린넨품명^상세규격^운용&#xA;안전재고량^린넨보관실&#xA;안전재고량^현재고량^청구량^불출량^린넨보관실&#xA;실재고량^청구일시^수령일시^비고^마감자^마감일시^청구구분" colsep="^" colwidth="66, 80, 80, 80, 80, 65, 120, 80, 75, 75, 75, 65, 70, 75, 120, 120, 100, 75, 120, 80, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:30px; width:1185px; height:615px; ">
  162. <col ref="lnedflag" type="combo" style="text-align:center; ">
  163. <choices>
  164. <itemset nodeset="/root/init/grupcdinfo/grupcdlist">
  165. <label ref="cdnm"/>
  166. <value ref="cdid"/>
  167. </itemset>
  168. </choices>
  169. </col>
  170. <col ref="erflag" type="combo" style="text-align:center; ">
  171. <choices>
  172. <item>
  173. <label>응급</label>
  174. <value>Y</value>
  175. </item>
  176. <item>
  177. <label>정규</label>
  178. <value>N</value>
  179. </item>
  180. </choices>
  181. </col>
  182. <col editable="false" ref="deptcd" type="combo">
  183. <choices>
  184. <itemset nodeset="/root/init/csrdeptlist">
  185. <label ref="deptnm"/>
  186. <value ref="deptcd"/>
  187. </itemset>
  188. </choices>
  189. </col>
  190. <col ref="reqdd" visibility="hidden" format="yyyy-mm-dd"/>
  191. <col ref="goodcd"/>
  192. <col ref="goodcdseq" visibility="visible"/>
  193. <col ref="lngoodnm" visibility="visible"/>
  194. <col ref="goodmodel"/>
  195. <col ref="deptlnsfcnt" format="#,###"/>
  196. <col ref="lnsfcnt" visibility="visible"/>
  197. <col ref="nowcnt" format="#,###"/>
  198. <col ref="reqcnt"/>
  199. <col ref="outcnt" format="#,###"/>
  200. <col ref="lnrlcnt" format="#,###"/>
  201. <col ref="reqdt" format="yyyy-mm-dd hh:nn:ss"/>
  202. <col ref="recdt" format="yyyy-mm-dd hh:nn:ss"/>
  203. <col ref="remark"/>
  204. <col ref="lnednm"/>
  205. <col ref="lneddt" format="yyyy-mm-dd hh:nn:ss"/>
  206. <col ref="lnrqflag" type="combo" style="text-align:center; ">
  207. <choices>
  208. <itemset nodeset="/root/init/grupcdinfo1/grupcdlist">
  209. <label ref="cdnm"/>
  210. <value ref="cdid"/>
  211. </itemset>
  212. </choices>
  213. </col>
  214. <col ref="lnedid" visibility="hidden"/>
  215. <col ref="seqno" visibility="hidden"/>
  216. <col ref="fromdd" visibility="hidden"/>
  217. </datagrid>
  218. <select1 id="rdo_gubuncd" ref="/root/send/gubuncd" disabled="true" visibility="hidden" appearance="full" cols="2" overflow="visible" style="left:220px; top:5px; width:390px; height:15px; border-style:none; ">
  219. <choices>
  220. <item>
  221. <label>물품마스터</label>
  222. <value>01</value>
  223. </item>
  224. <item>
  225. <label>창고마스터</label>
  226. <value>02</value>
  227. </item>
  228. </choices>
  229. </select1>
  230. <button id="button1" class="btn2_letter2" style="left:1089px; top:4px; width:42px; height:19px; ">
  231. <caption>엑셀</caption>
  232. <script type="javascript" ev:event="DOMActivate">
  233. <![CDATA[
  234. var fileName = window.fileDialog("save", ",", false, "린넨일일마감관리", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  235. if (fileName != "")
  236. {
  237. grd_lnedlist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
  238. } ]]>
  239. </script>
  240. </button>
  241. </group>
  242. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:1185px; height:35px; background-color:#fffbf2; border-color:#ffd799; ">.,m</shape>
  243. <button id="btn_search" class="btn1_letter2" navindex="2" style="left:1067px; top:27px; width:56px; height:22px; ">
  244. <caption>조회</caption>
  245. <script type="javascript" ev:event="DOMActivate">
  246. <![CDATA[
  247. fSearch();
  248. ]]>
  249. </script>
  250. </button>
  251. <line id="line2" class="line_4" style="x1:1060px; y1:25px; x2:1060px; y2:50px; "/>
  252. <caption id="cap_csrreqdeptcd" class="search_name" style="left:200px; top:30px; width:81px; height:17px; ">청구일자:</caption>
  253. <input id="ipt_reqdd" ref="/root/send/reqdd" class="input_default" inputtype="date" maxlength="6" format="yyyy-mm-dd" style="left:285px; top:30px; width:85px; height:19px; ">
  254. <script type="javascript" ev:event="xforms-value-changed">
  255. <![CDATA[
  256. fSearch();
  257. ]]>
  258. </script>
  259. </input>
  260. <caption id="cap_instcd" class="search_name" visibility="hidden" style="left:10px; top:30px; width:86px; height:17px; ">기관코드 :</caption>
  261. <output id="opt_instcdnm" ref="/root/send/instcdnm" class="output_fix" visibility="hidden" style="left:100px; top:30px; width:105px; height:19px; text-align:center; "/>
  262. <button id="btn_prt" class="btn1_letter2" style="left:1125px; top:27px; width:56px; height:22px; ">
  263. <caption>출력</caption>
  264. <script type="javascript" ev:event="DOMActivate">
  265. <![CDATA[
  266. fPrintRex();
  267. ]]>
  268. </script>
  269. </button>
  270. <caption id="caption1" class="search_name" style="left:805px; top:30px; width:81px; height:17px; ">부서구분:</caption>
  271. <select1 id="cmb_deptcd" ref="/root/send/deptcd" appearance="minimal" style="left:900px; top:30px; width:95px; height:19px; ">
  272. <choices>
  273. <itemset nodeset="/root/init/csrdeptlist">
  274. <label ref="deptnm"/>
  275. <value ref="deptcd"/>
  276. </itemset>
  277. </choices>
  278. </select1>
  279. <caption id="caption2" class="search_name" style="left:480px; top:30px; width:81px; height:17px; ">마감구분:</caption>
  280. <select1 id="rdo_lnedflag" ref="/root/send/lnedflag" appearance="full" cols="4" overflow="visible" style="left:575px; top:30px; width:225px; height:15px; border-style:none; ">
  281. <choices>
  282. <itemset nodeset="/root/init/grupcdinfo/grupcdlist">
  283. <label ref="cdnm"/>
  284. <value ref="cdid"/>
  285. </itemset>
  286. </choices>
  287. </select1>
  288. <input id="ipt_reqtodd" ref="/root/send/reqtodd" class="input_default" visibility="hidden" inputtype="date" maxlength="6" format="yyyy-mm-dd" style="left:390px; top:30px; width:85px; height:19px; ">
  289. <script type="javascript" ev:event="xforms-value-changed">
  290. <![CDATA[
  291. fSearch();
  292. ]]>
  293. </script>
  294. </input>
  295. <caption id="cap_bar" visibility="hidden" style="left:376px; top:29px; width:16px; height:20px; font-weight:bold; ">~</caption>
  296. <caption id="caption4" class="search_name" style="left:10px; top:30px; width:64px; height:17px; ">구분 :</caption>
  297. <select1 id="rdo_flag" ref="/root/send/flag" appearance="full" cols="2." overflow="visible" style="left:70px; top:30px; width:100px; height:15px; background-color:transparent; border-style:none; ">
  298. <choices>
  299. <item>
  300. <label>업무</label>
  301. <value>1</value>
  302. </item>
  303. <item>
  304. <label>조회</label>
  305. <value>2</value>
  306. </item>
  307. </choices>
  308. <script type="javascript" ev:event="xforms-value-changed">
  309. <![CDATA[
  310. if(rdo_flag.value == "1") {
  311. var pord = model.getValue("/root/hidden/setvalue/cdid");
  312. var userid = getUserInfo("userid");
  313. if(userid="ENR") {
  314. btn_sav.disabled = false;
  315. } else {
  316. if (pord == userid) {
  317. btn_sav.disabled = false;
  318. } else {
  319. btn_sav.disabled = true;
  320. }
  321. }
  322. ipt_reqtodd.visible = false;
  323. cap_bar.visible = false;
  324. } else {
  325. btn_sav.disabled = true;
  326. ipt_reqtodd.visible = true;
  327. cap_bar.visible = true;
  328. }
  329. ]]>
  330. </script>
  331. </select1>
  332. </xhtml:body>
  333. </xhtml:html>