SMMNG02500_세탁물이불청구관리.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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. <pnrqinfo>
  11. <pnrqlist>
  12. <ioflag/>
  13. <cdnm/>
  14. <safecnt/>
  15. <delreqcnt/>
  16. <reqcnt/>
  17. <reqid/>
  18. <remark2/>
  19. <delcnt/>
  20. <outcnt/>
  21. <outid/>
  22. <remark1/>
  23. <deptcd/>
  24. <reqdd/>
  25. <instcd/>
  26. <goodscd/>
  27. <bfoutcnt/>
  28. <bfdelcnt/>
  29. <deptnm/>
  30. <outnm/>
  31. <reqnm/>
  32. </pnrqlist>
  33. <csrdeptlist/>
  34. </pnrqinfo>
  35. <cond>
  36. <reqdd/>
  37. <deptcd/>
  38. <instcd/>
  39. </cond>
  40. <csrdeptlist/>
  41. </main>
  42. <send>
  43. <reqdd/>
  44. <deptcd/>
  45. <gubuncd>01</gubuncd>
  46. </send>
  47. <hidden>
  48. <mnw>
  49. <codelist/>
  50. </mnw>
  51. </hidden>
  52. <init>
  53. <csrdeptinfo/>
  54. </init>
  55. </root>
  56. </instance>
  57. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  60. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  61. <script type="javascript" ev:event="xforms-ready">
  62. <![CDATA[
  63. fInitialize();
  64. ]]>
  65. </script>
  66. <submission id="TRMNG00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/csrdeptlist"/>
  67. <submission id="TRMNG02501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/pnrqinfo"/>
  68. <submission id="TXMNG02501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  69. <submission id="TXMNG02502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  70. <submission id="TRMNV00001" mediatype="application/x-www-form-urlencoded" method="post"/>
  71. </model>
  72. <script type="javascript">
  73. <![CDATA[
  74. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  75. function fInitialize()
  76. {
  77. model.setValue(opt_instcdnm.attribute("ref"), getUserInfo("dutplceinstnm")); //기관코드
  78. model.setValue(ipt_reqdd.attribute("ref"), getCurrentDate()); //현재날짜
  79. model.setValue(cmb_deptcd.attribute("ref"), getUserInfo("dutplcecd"));
  80. fGetHardCodeInfo("/root/send/cdgrupid", "/root/init/csrdeptinfo", "160"); // 중앙공급실 부서코드 조회
  81. var userdutplcecd = model.getValue("/root/init/csrdeptinfo/codelist[cdid = '"+getUserInfo("dutplcecd")+"']/cdid");
  82. if (!isNull(userdutplcecd)) {
  83. model.setValue(cmb_deptcd.attribute("ref"), 'ALL');
  84. } else {
  85. model.setValue(cmb_deptcd.attribute("ref"), getUserInfo("dutplcecd"));
  86. cmb_deptcd.disabled = true; //중앙공급실이 아닐 경우 부서선택 숨김
  87. }
  88. ipt_reqdd.refresh();
  89. model.makeValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
  90. model.makeValue("/root/send/reqdata/useyn", "Y");
  91. submit("TRMNG00402"); //부서
  92. addComboItem("cmb_deptcd","--전체--","ALL","above");
  93. fSearch();
  94. }
  95. function fSearch() {
  96. model.setValue("/root/send/reqdd", model.getValue(ipt_reqdd.attribute("ref")));
  97. model.setValue("/root/send/deptcd", model.getValue(cmb_deptcd.attribute("ref")));
  98. model.setValue("/root/send/gubuncd", model.getValue(rdo_gubuncd.attribute("ref"))); //마스터코드구분 01:물품마스터02:창고마스터
  99. submit("TRMNG02501");
  100. var ioflag;
  101. var userdutplcecd = model.getValue("/root/init/csrdeptinfo/codelist[cdid = '"+getUserInfo("dutplcecd")+"']/cdid");
  102. for(var i = grd_pnrqlist.fixedRows; i < grd_pnrqlist.rows; i++) {
  103. ioflag = grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("ioflag")); //N, O N : 신규 O: 수정
  104. outidflag = grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("outid"));
  105. reqidflag = grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("reqid"));
  106. if(ioflag == "N") {
  107. grd_pnrqlist.rowStatus(i) = "1";
  108. if (!isNull(userdutplcecd) && isNull(outidflag)) {
  109. grd_pnrqlist.colType(grd_pnrqlist.colRef("reqcnt")) = 'output'; //중앙공급실에서 병동 청구수량 비활성화
  110. grd_pnrqlist.colType(grd_pnrqlist.colRef("delreqcnt")) = 'output';
  111. grd_pnrqlist.colType(grd_pnrqlist.colRef("rtnreqcnt")) = 'output';
  112. grd_pnrqlist.colType(grd_pnrqlist.colRef("remark2")) = 'output'; //중앙공급실에서 비고 비활성화
  113. grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("outnm")) = getUserInfo("usernm"); //담당자
  114. grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("outid")) = getUserInfo("userid"); //담당자
  115. } else if (isNull(userdutplcecd) && isNull(reqidflag)) {
  116. grd_pnrqlist.colType(grd_pnrqlist.colRef("outcnt")) = 'output'; //병동에서에서 병동 불출수량 비활성화
  117. grd_pnrqlist.colType(grd_pnrqlist.colRef("delcnt")) = 'output';
  118. grd_pnrqlist.colType(grd_pnrqlist.colRef("rtncnt")) = 'output';
  119. grd_pnrqlist.colType(grd_pnrqlist.colRef("remark1")) = 'output'; //중앙공급실에서 비고 비활성화
  120. grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("reqnm")) = getUserInfo("usernm"); //청구요청자
  121. grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("reqid")) = getUserInfo("userid"); //담당자
  122. }
  123. }
  124. if (ioflag == "O" && !isNull(userdutplcecd) ) {
  125. grd_pnrqlist.colType(grd_pnrqlist.colRef("reqcnt")) = 'output'; //중앙공급실에서 병동 청구수량 비활성화
  126. grd_pnrqlist.colType(grd_pnrqlist.colRef("delreqcnt")) = 'output';
  127. grd_pnrqlist.colType(grd_pnrqlist.colRef("remark2")) = 'output'; //중앙공급실에서 비고 비활성화
  128. if (isNull(outidflag) ) {
  129. grd_pnrqlist.rowStatus(i) = "2";
  130. grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("outnm")) = getUserInfo("usernm"); //담당자
  131. grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("outid")) = getUserInfo("userid"); //담당자
  132. }
  133. } else if (ioflag == "O" && isNull(userdutplcecd)) {
  134. grd_pnrqlist.colType(grd_pnrqlist.colRef("outcnt")) = 'output'; //병동에서에서 병동 불출수량 비활성화
  135. grd_pnrqlist.colType(grd_pnrqlist.colRef("delcnt")) = 'output';
  136. grd_pnrqlist.colType(grd_pnrqlist.colRef("remark1")) = 'output'; //중앙공급실에서 비고 비활성화
  137. grd_pnrqlist.colType(grd_pnrqlist.colRef("rtncnt")) = 'output';
  138. if (isNull(reqidflag)) {
  139. grd_pnrqlist.rowStatus(i) = "2";
  140. grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("reqnm")) = getUserInfo("usernm"); //청구요청자
  141. grd_pnrqlist.valueMatrix(i, grd_pnrqlist.colRef("reqid")) = getUserInfo("userid"); //담당자
  142. }
  143. }
  144. }
  145. }
  146. ]]>
  147. </script>
  148. </xhtml:head>
  149. <xhtml:body pagewidth="1024" pageheight="546" guideline="1,1007;2,546;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  150. <group id="grp_tle" style="left:0px; top:0px; width:995px; height:13px; ">
  151. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">세탁물이불운영관리</caption>
  152. </group>
  153. <group id="grp_biz" scroll="auto" style="left:0px; top:60px; width:995px; height:453px; ">
  154. <caption id="caption12" class="tit_2" style="left:5px; top:9px; width:134px; height:14px; ">세탁물이불운영관리</caption>
  155. <line id="line1" class="line_1" style="x1:0px; y1:24px; x2:990px; y2:24px; "/>
  156. <button id="btn_sav" class="btn5_letter2" style="left:948px; top:3px; width:42px; height:19px; ">
  157. <caption>저장</caption>
  158. <script type="javascript" ev:event="DOMActivate">
  159. <![CDATA[
  160. model.makeValue("/root/send/savedata/pnrqlist", getGridUpdateData(grd_pnrqlist) );
  161. submit("TXMNG02501");
  162. submit("TXMNG02502");
  163. fSearch();
  164. ]]>
  165. </script>
  166. </button>
  167. <datagrid id="grd_pnrqlist" nodeset="/root/main/pnrqinfo/pnrqlist" class="datagrid2" caption="구분^부서명^품목^안전&#xA;재고량^폐기&#xA;요청량^청구&#xA;요청량^반납&#xA;요청량^청구자^비고^실제&#xA;폐기량^실제&#xA;불출량^실제&#xA;반납량^담당자^비고^부서코드^청구일^기관코드^품목코드^전불출량^전폐기량^전반납량^날짜" colsep="^" colwidth="0, 129, 100, 55, 55, 55, 55, 67, 98, 55, 55, 55, 66, 103, 30, 28, 29, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:29px; width:990px; height:416px; ">
  168. <col ref="ioflag" visibility="visible"/>
  169. <col ref="deptnm" visibility="visible"/>
  170. <col ref="cdnm" visibility="visible"/>
  171. <col ref="safecnt" visibility="visible"/>
  172. <col ref="delreqcnt" type="input" visibility="visible" format="#,###"/>
  173. <col ref="reqcnt" type="input" visibility="visible" format="#,###"/>
  174. <col ref="rtnreqcnt" type="input"/>
  175. <col ref="reqnm" visibility="visible"/>
  176. <col ref="remark2" type="input" visibility="visible"/>
  177. <col ref="delcnt" type="input" visibility="visible"/>
  178. <col ref="outcnt" type="input" visibility="visible" format="#,###"/>
  179. <col ref="rtncnt" type="input"/>
  180. <col ref="outnm" visibility="visible"/>
  181. <col ref="remark1" type="input" visibility="visible"/>
  182. <col ref="deptcd" visibility="hidden"/>
  183. <col ref="reqdd" visibility="hidden"/>
  184. <col ref="instcd" visibility="hidden"/>
  185. <col ref="goodscd" visibility="hidden"/>
  186. <col ref="bfoutcnt" visibility="hidden"/>
  187. <col ref="bfdelcnt" visibility="hidden"/>
  188. <col ref="bfrtncnt" visibility="hidden"/>
  189. <col ref="reqid" visibility="hidden"/>
  190. <col ref="outid" visibility="hidden"/>
  191. <script type="javascript" ev:event="onkeypress">
  192. <![CDATA[
  193. var row = grd_pnrqlist.row;
  194. if(event.keyCode == 13) { // Enter 쳤을 경우 아래 수량으로
  195. if(grd_pnrqlist.col == grd_pnrqlist.colRef("delreqcnt") || grd_pnrqlist.col == grd_pnrqlist.colRef("reqcnt") ||
  196. grd_pnrqlist.col == grd_pnrqlist.colRef("delcnt") | grd_pnrqlist.col == grd_pnrqlist.colRef("outcnt") ) { //불출수량이나 미불출수량 엔터시
  197. if(grd_pnrqlist.row + 1 < grd_pnrqlist.rows) {
  198. grd_pnrqlist.row = row + 1;
  199. }
  200. }
  201. }
  202. ]]>
  203. </script>
  204. </datagrid>
  205. <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; ">
  206. <choices>
  207. <item>
  208. <label>물품마스터</label>
  209. <value>01</value>
  210. </item>
  211. <item>
  212. <label>창고마스터</label>
  213. <value>02</value>
  214. </item>
  215. </choices>
  216. </select1>
  217. </group>
  218. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:995px; height:35px; background-color:#fffbf2; border-color:#ffd799; ">.,m</shape>
  219. <caption id="caption2" class="search_name" style="left:480px; top:30px; width:88px; height:17px; ">부 서 명 :</caption>
  220. <caption id="cap_csrreqdeptcd" class="search_name" style="left:300px; top:30px; width:68px; height:17px; ">청구일:</caption>
  221. <button id="btn_search" class="btn1_letter2" navindex="2" style="left:935px; top:25px; width:56px; height:22px; ">
  222. <caption>조회</caption>
  223. <script type="javascript" ev:event="DOMActivate">
  224. <![CDATA[
  225. fSearch();
  226. ]]>
  227. </script>
  228. </button>
  229. <input id="ipt_reqdd" ref="/root/main/cond/reqdd" class="input_default" inputtype="date" maxlength="6" format="yyyy-mm-dd" style="left:370px; top:30px; width:90px; height:19px; ">
  230. <script type="javascript" ev:event="xforms-value-changed">
  231. <![CDATA[
  232. fSearch();
  233. ]]>
  234. </script>
  235. </input>
  236. <select1 id="cmb_deptcd" ref="/root/main/cond/deptcd" appearance="minimal" style="left:570px; top:30px; width:100px; height:19px; ">
  237. <choices>
  238. <itemset nodeset="/root/main/csrdeptlist">
  239. <label ref="deptnm"/>
  240. <value ref="deptcd"/>
  241. </itemset>
  242. </choices>
  243. <script type="javascript" ev:event="xforms-value-changed">
  244. <![CDATA[
  245. fSearch();
  246. ]]>
  247. </script>
  248. </select1>
  249. <line id="line2" class="line_4" style="x1:930px; y1:23px; x2:930px; y2:48px; "/>
  250. <caption id="cap_instcd" class="search_name" style="left:10px; top:30px; width:86px; height:17px; ">기관코드 :</caption>
  251. <output id="opt_instcdnm" ref="/root/main/cond/instcd" class="output_fix" style="left:100px; top:30px; width:175px; height:19px; text-align:center; "/>
  252. </xhtml:body>
  253. </xhtml:html>