SMMNG02101_세탁물안전재고관리.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  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. <lnsfinfo>
  11. <lnsflist>
  12. </lnsflist>
  13. <csrdeptlist/>
  14. </lnsfinfo>
  15. <cond>
  16. <deptcd/>
  17. <srchflag/>
  18. <workdd/>
  19. </cond>
  20. <csrdeptlist/>
  21. </main>
  22. <send>
  23. <deptcd/>
  24. <instcdnm/>
  25. <gubuncd>01</gubuncd>
  26. <srchflag/>
  27. <workdd/>
  28. <safestocflag>3</safestocflag>
  29. </send>
  30. <init>
  31. <csrdeptinfo/>
  32. </init>
  33. </root>
  34. </instance>
  35. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  36. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  37. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  38. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  39. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  40. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  41. <script type="javascript" ev:event="xforms-ready">
  42. <![CDATA[
  43. rdo_srch.value = "D";
  44. fInitialize();
  45. ]]>
  46. </script>
  47. <submission id="TRMNG02102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/lnsfinfo"/>
  48. <submission id="TXMNG02102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  49. <submission id="TRMNG00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/csrdeptlist"/>
  50. <submission id="TRMNV00001" mediatype="application/x-www-form-urlencoded" method="post"/>
  51. </model>
  52. <script type="javascript">
  53. <![CDATA[
  54. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  55. var predept = "";
  56. function fInitialize()
  57. {
  58. fGetHardCodeInfo("/root/send/grupid", "/root/init/csrdeptinfo", "018"); // 안전재고관리구분
  59. model.setValue(opt_instcdnm.attribute("ref"), getUserInfo("dutplceinstnm")); //기관코드
  60. model.setValue(ipt_workdd.attribute("ref"), getCurrentDate());
  61. model.makeValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
  62. model.makeValue("/root/send/reqdata/useyn", "Y");
  63. var csrdept = model.getValue("/root/init/csrdeptinfo/codelist[cdgrupid='018' and cdid='" + getUserInfo("dutplcecd") + "']/cdid");
  64. var csryn = "N";
  65. if(csrdept == null || csrdept == "") {
  66. rdo_srch.value = "D";
  67. rdo_srch.disabled = true;
  68. //cmb_deptcd.disabled = true;
  69. cmb_deptcd.value = getUserInfo("dutplcecd");
  70. } else {
  71. csryn = "Y";
  72. }
  73. model.makeValue("/root/send/reqdata/csryn", csryn);
  74. submit("TRMNG00402");
  75. fSearch();
  76. }
  77. function fSearch() {
  78. var deptcd = cmb_deptcd.value;
  79. model.setValue("/root/send/deptcd" , model.getValue(cmb_deptcd.attribute("ref")));
  80. model.setValue("/root/send/srchflag" , model.getValue(rdo_srch.attribute("ref"))); //마스터코드구분 01:물품마스터02:창고마스터
  81. model.setValue("/root/send/workdd" , model.getValue(ipt_workdd.attribute("ref")));
  82. model.setValue("/root/send/safestocflag", model.getValue(rdo_safestocflag.attribute("ref")));
  83. submit("TRMNG02102");
  84. if(deptcd == "01" || deptcd == "02" || deptcd == "03") {
  85. grd_lnsflist.colDisabled(grd_lnsflist.colRef("deptlnsfcnt")) = false;
  86. grd_lnsflist.colDisabled(grd_lnsflist.colRef("lnsfcnt")) = false;
  87. grd_lnsflist.colDisabled(grd_lnsflist.colRef("lnrlcnt")) = false;
  88. btn_sav.visible =true;
  89. button1.visible = true;
  90. button2.visible = true;
  91. } else {
  92. grd_lnsflist.colDisabled(grd_lnsflist.colRef("deptlnsfcnt")) = true;
  93. grd_lnsflist.colDisabled(grd_lnsflist.colRef("lnsfcnt")) = true;
  94. grd_lnsflist.colDisabled(grd_lnsflist.colRef("lnrlcnt")) = true;
  95. btn_sav.visible =false;
  96. button1.visible = false;
  97. button2.visible = false;
  98. }
  99. }
  100. function fSettingGoodList(pnode) {
  101. var codynode = instance1.selectNodes(pnode + "/*");
  102. var addRow = grd_lnsflist.rows - grd_lnsflist.fixedRows;
  103. for (var j = 1; j <= codynode.length; j++) {
  104. for (var i = grd_lnsflist.fixedRows; i < grd_lnsflist.rows; i++) {
  105. var goodnew = model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodcd");
  106. var goodseqnew = model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodcdseq");
  107. var goodold = grd_lnsflist.valueMatrix(i, grd_lnsflist.colRef("goodcd"));
  108. var goodseqold = grd_lnsflist.valueMatrix(i, grd_lnsflist.colRef("goodcdseq"));
  109. var goodoldnm = grd_lnsflist.valueMatrix(i, grd_lnsflist.colRef("goodnm"));
  110. if (goodnew == goodold && goodseqnew == goodseqold) {
  111. alert("<"+ goodoldnm + ">" + "은 이미 등록된 물품입니다.");
  112. return;
  113. }
  114. }
  115. if(addRow > grd_lnsflist.rows - grd_lnsflist.fixedRows)
  116. {
  117. misfGridIUD(grd_lnsflist,"A");
  118. addRow = grd_lnsflist.rows - grd_lnsflist.fixedRows;
  119. }
  120. model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodcd"));
  121. model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/goodcdseq" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodcdseq"));
  122. model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/lngoodnm" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/lngoodnm"));
  123. model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodmodel"));
  124. model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/goodunit" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodunit"));
  125. model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/deptcd" , model.getValue("/root/main/cond/deptcd"));
  126. model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/fromdd" , getCurrentDate());
  127. addRow = addRow + 1;
  128. }
  129. model.recalculate();
  130. model.refresh();
  131. }
  132. ]]>
  133. </script>
  134. </xhtml:head>
  135. <xhtml:body pagewidth="1196" pageheight="786" guideline="1,1196;2,786;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  136. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; font-family:돋움체; ">
  137. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">안전재고 관리</caption>
  138. </group>
  139. <group id="grp_biz" scroll="auto" style="left:0px; top:60px; width:1195px; height:705px; font-family:돋움체; ">
  140. <caption id="caption12" class="tit_2" style="left:5px; top:9px; width:121px; height:14px; font-family:돋움체; ">안전재고관리</caption>
  141. <button id="btn_sav" class="btn5_letter2" visibility="hidden" style="left:1141px; top:3px; width:42px; height:19px; font-family:돋움체; ">
  142. <caption>저장</caption>
  143. <script type="javascript" ev:event="DOMActivate">
  144. <![CDATA[
  145. model.makeValue("/root/send/savedata/lnsflist", getGridUpdateData(grd_lnsflist) );
  146. //alert(instance1.selectNodesXml("/root/send"));
  147. submit("TXMNG02102");
  148. fSearch();
  149. ]]>
  150. </script>
  151. </button>
  152. <datagrid id="grd_lnsflist" nodeset="/root/main/lnsfinfo/lnsflist" caption="구분^물품코드^상세코드^물품명^상세규격^단위^운용&#xA;안전재고^물품보관실^물품보관실^물품보관실^물품보관실^부서코드^관리자^비고|구분^물품코드^상세코드^물품명^상세규격^단위^운용&#xA;안전재고^변경전수량^최종요청수량^안전재고수량^실재고수량^부서코드^관리자^비고" colsep="^" colwidth="75, 86, 65, 130, 100, 70, 73, 80, 0, 81, 80, 100, 100, 130, 100, 100, 100, 100, 100" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="26" rowsep="|" style="left:2px; top:29px; width:1190px; height:670px; font-family:돋움체; ">
  153. <col ref="safestocflag" type="combo">
  154. <choices>
  155. <item>
  156. <label>기구</label>
  157. <value>1</value>
  158. </item>
  159. <item>
  160. <label>진료재료</label>
  161. <value>2</value>
  162. </item>
  163. <item>
  164. <label>멸균방포</label>
  165. <value>4</value>
  166. </item>
  167. <item>
  168. <label>기타</label>
  169. <value>9</value>
  170. </item>
  171. <item>
  172. <label>린넨</label>
  173. <value>3</value>
  174. </item>
  175. </choices>
  176. </col>
  177. <col ref="goodcd" type="inputbutton"/>
  178. <col ref="goodcdseq"/>
  179. <col ref="lngoodnm"/>
  180. <col ref="goodmodel"/>
  181. <col ref="goodunit"/>
  182. <col ref="deptlnsfcnt" type="input"/>
  183. <col ref="bflnsfcnt"/>
  184. <col ref="bfreqcnt"/>
  185. <col ref="lnsfcnt" type="input"/>
  186. <col ref="lnrlcnt" type="input"/>
  187. <col disabled="true" ref="deptcd" type="combo">
  188. <choices>
  189. <itemset nodeset="/root/main/csrdeptlist">
  190. <label ref="deptnm"/>
  191. <value ref="deptcd"/>
  192. </itemset>
  193. </choices>
  194. </col>
  195. <col ref="lastupdtrnm" visibility="visible" ype="output"/>
  196. <col ref="remark" type="input" visibility="visible"/>
  197. <col ref="lastupdtrid" type="output" visibility="hidden"/>
  198. <col ref="oldlnsfcnt" visibility="hidden"/>
  199. <col ref="nextfromdd" visibility="hidden"/>
  200. <col ref="fromdd" visibility="hidden"/>
  201. <col ref="todd" visibility="hidden"/>
  202. <script type="javascript" ev:event="onbuttonclick">
  203. <![CDATA[
  204. model.removeNodeset(gvParamPath +"/SPMNG02801_/SPMNG02801_value");
  205. model.property("flag") = "req";
  206. if (grd_lnsflist.col == grd_lnsflist.colRef("goodcd")) {//물품코드 버튼을 눌렀을 때
  207. model.removeNodeset("/root/copynode");
  208. model.makeNode("/root/copynode");
  209. model.refresh();
  210. rszfOpenPopUpListByWndName(grd_lnsflist,"","goodcd,goodcdseq,lngoodnm,goodmodel,goodunit","SPMNG02801","","", "Y");
  211. var CSV = model.getValue(gvParamPath +"/SPMNG02801_/SPMNG02801_value");
  212. setCSVToNode("/root/copynode", CSV, "grd_lnsflist");
  213. fSettingGoodList("/root/copynode");
  214. }
  215. ]]>
  216. </script>
  217. <script type="javascript" ev:event="xforms-value-changed">
  218. <![CDATA[
  219. if ( grd_lnsflist.col == grd_lnsflist.colRef("lnsfcnt") ) {
  220. var oldlnsfcnt = grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("oldlnsfcnt"));
  221. var deptlnsfcnt = grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("deptlnsfcnt"));
  222. var cnt = parseInt(grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("lnsfcnt")), 10) - parseInt(grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("oldlnsfcnt")), 10);
  223. grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("deptlnsfcnt")) = parseInt(deptlnsfcnt, 10) + parseInt(cnt, 10);
  224. var date = getCurrentDate().toDate("YYYYMMDD");
  225. var nextday = (date.getAddDate(1, "D")).getDateFormat("YYYYMMDD");
  226. grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("nextfromdd")) = nextday;
  227. grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("todd")) = getCurrentDate();
  228. }
  229. ]]>
  230. </script>
  231. <script type="javascript" ev:event="onaftersort">
  232. <![CDATA[
  233. grd_lnsflist.gridToInstance();
  234. ]]>
  235. </script>
  236. </datagrid>
  237. <line id="line5" class="line_1" style="x1:1px; y1:26px; x2:1194px; y2:25px; font-family:돋움체; "/>
  238. <select1 id="rdo_gubuncd" ref="/root/send/gubuncd" disabled="true" visibility="hidden" appearance="full" cols="2" overflow="visible" style="left:770px; top:5px; width:170px; height:15px; font-family:돋움체; border-style:none; ">
  239. <choices>
  240. <item>
  241. <label>물품마스터</label>
  242. <value>01</value>
  243. </item>
  244. <item>
  245. <label>창고마스터</label>
  246. <value>02</value>
  247. </item>
  248. </choices>
  249. </select1>
  250. <button id="button1" class="btn2_letter2" visibility="hidden" style="left:1050px; top:3px; width:42px; height:19px; font-family:돋움체; ">
  251. <caption>추가</caption>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. if ( cmb_deptcd.value == null || cmb_deptcd.value == "") {
  255. alert("부서를 선택하세요!");
  256. return;
  257. } else {
  258. grd_lnsflist.addRow();
  259. }
  260. ]]>
  261. </script>
  262. </button>
  263. <button id="button2" class="btn2_letter2" visibility="hidden" style="left:1095px; top:3px; width:42px; height:19px; font-family:돋움체; ">
  264. <caption>삭제</caption>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. if(grd_lnsflist.row > -1 && grd_lnsflist.row >= grd_lnsflist.fixedrows){
  268. var firstRow = grd_lnsflist.selectedRow(0);
  269. var lastRow = grd_lnsflist.selectedRow(grd_lnsflist.selectedRows-1);
  270. for(var i = firstRow; i <= lastRow; i++) {
  271. grd_lnsflist.rowStatus(i) = "4";
  272. grd_lnsflist.valueMatrix(i, grd_lnsflist.colRef("todd")) = getCurrentDate();
  273. }
  274. }
  275. ]]>
  276. </script>
  277. </button>
  278. <select1 id="rdo_safestocflag" ref="/root/send/safestocflag" appearance="full" cellspacing="5" cols="6" overflow="visible" style="left:115px; top:8px; width:375px; height:13px; border-style:none; ">
  279. <choices>
  280. <item>
  281. <label>전체</label>
  282. <value/>
  283. </item>
  284. <item>
  285. <label>기구</label>
  286. <value>1</value>
  287. </item>
  288. <item>
  289. <label>진료재료</label>
  290. <value>2</value>
  291. </item>
  292. <item>
  293. <label>멸균방포</label>
  294. <value>4</value>
  295. </item>
  296. <item>
  297. <label>기타</label>
  298. <value>9</value>
  299. </item>
  300. <item>
  301. <label>린넨</label>
  302. <value>3</value>
  303. </item>
  304. </choices>
  305. <script type="javascript" ev:event="xforms-value-changed">
  306. <![CDATA[
  307. fSearch();
  308. ]]>
  309. </script>
  310. </select1>
  311. </group>
  312. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:1195px; height:35px; font-family:돋움체; background-color:#fffbf2; border-color:#ffd799; ">.,m</shape>
  313. <caption id="caption2" class="search_name" style="left:485px; top:30px; width:88px; height:17px; font-family:돋움체; ">부 서 명:</caption>
  314. <button id="btn_search" class="btn1_letter2" navindex="2" style="left:994px; top:27px; width:56px; height:22px; font-family:돋움체; ">
  315. <caption>조회</caption>
  316. <script type="javascript" ev:event="DOMActivate">
  317. <![CDATA[
  318. fSearch();
  319. ]]>
  320. </script>
  321. </button>
  322. <select1 id="cmb_deptcd" ref="/root/main/cond/deptcd" appearance="minimal" style="left:570px; top:28px; width:100px; height:19px; font-family:돋움체; ">
  323. <choices>
  324. <itemset nodeset="/root/main/csrdeptlist">
  325. <label ref="deptnm"/>
  326. <value ref="deptcd"/>
  327. </itemset>
  328. </choices>
  329. <script type="javascript" ev:event="xforms-value-changed">
  330. <![CDATA[
  331. fSearch();
  332. ]]>
  333. </script>
  334. </select1>
  335. <line id="line2" class="line_4" style="x1:985px; y1:25px; x2:985px; y2:50px; font-family:돋움체; "/>
  336. <caption id="cap_instcd" class="search_name" style="left:10px; top:30px; width:86px; height:17px; font-family:돋움체; ">기관코드:</caption>
  337. <output id="opt_instcdnm" ref="/root/send/instcdnm" class="output_fix" style="left:100px; top:29px; width:160px; height:19px; font-family:돋움체; text-align:center; "/>
  338. <caption id="caption1" class="search_name" style="left:275px; top:30px; width:88px; height:17px; font-family:돋움체; ">부서구분:</caption>
  339. <select1 id="rdo_srch" ref="/root/main/cond/srchflag" appearance="full" cols="2" overflow="visible" style="left:370px; top:30px; width:110px; height:15px; font-family:돋움체; border-style:none; ">
  340. <choices>
  341. <item>
  342. <label>전체</label>
  343. <value>A</value>
  344. </item>
  345. <item>
  346. <label>부서별</label>
  347. <value>D</value>
  348. </item>
  349. </choices>
  350. <script type="javascript" ev:event="xforms-value-changed">
  351. <![CDATA[
  352. if ( rdo_srch.value == "A") {
  353. caption2.visible = false;
  354. cmb_deptcd.visible = false;
  355. predept = cmb_deptcd.value;
  356. cmb_deptcd.value = "";
  357. grd_lnsflist.colHidden(grd_lnsflist.colRef("deptcd")) = true;
  358. grd_lnsflist.colHidden(grd_lnsflist.colRef("remark")) = true;
  359. grd_lnsflist.colHidden(grd_lnsflist.colRef("lastupdtrnm")) = true;
  360. grd_lnsflist.colHidden(grd_lnsflist.colRef("bfreqcnt")) = true;
  361. grd_lnsflist.colHidden(grd_lnsflist.colRef("bflnsfcnt")) = true;
  362. btn_sav.visible = false;
  363. button1.visible = false;
  364. button2.visible = false;
  365. fSearch();
  366. } else {
  367. caption2.visible = true;
  368. cmb_deptcd.visible = true;
  369. cmb_deptcd.value = predept;
  370. grd_lnsflist.colHidden(grd_lnsflist.colRef("deptcd")) = false;
  371. grd_lnsflist.colHidden(grd_lnsflist.colRef("remark")) = false;
  372. grd_lnsflist.colHidden(grd_lnsflist.colRef("lastupdtrnm")) = false;
  373. grd_lnsflist.colHidden(grd_lnsflist.colRef("bfreqcnt")) = false;
  374. grd_lnsflist.colHidden(grd_lnsflist.colRef("bflnsfcnt")) = false;
  375. // btn_sav.visible = true;
  376. // button1.visible = true;
  377. // button2.visible = true;
  378. fSearch();
  379. }
  380. ]]>
  381. </script>
  382. </select1>
  383. <button id="button3" class="btn1_letter2" navindex="2" style="left:1055px; top:27px; width:56px; height:22px; font-family:돋움체; ">
  384. <caption>출력</caption>
  385. <script type="javascript" ev:event="DOMActivate">
  386. <![CDATA[
  387. exeReportPreview("RPMNG02100", "XMLSTR");
  388. ]]>
  389. </script>
  390. </button>
  391. <caption id="caption3" class="search_name" style="left:685px; top:30px; width:88px; height:17px; font-family:돋움체; ">업무일자:</caption>
  392. <input id="ipt_workdd" ref="/root/main/cond/workdd" inputtype="date" style="left:770px; top:28px; width:90px; height:19px; font-family:돋움체; ">
  393. <script type="javascript" ev:event="xforms-value-changed">
  394. <![CDATA[
  395. fSearch();
  396. ]]>
  397. </script>
  398. </input>
  399. <button id="button4" class="btn1_letter2" navindex="2" style="left:1115px; top:27px; width:56px; height:22px; font-family:돋움체; ">
  400. <caption>엑셀</caption>
  401. <script type="javascript" ev:event="DOMActivate">
  402. <![CDATA[
  403. var fileName = window.fileDialog("save", ",", false, "세탁물 안전재고관리", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  404. if (fileName != "")
  405. {
  406. grd_lnsflist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
  407. }
  408. ]]>
  409. </script>
  410. </button>
  411. </xhtml:body>
  412. </xhtml:html>