SPMNW18000_부서별기자재현황.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>부서별 장비 이용도 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cond>
  11. <fixasetcd/>
  12. <deptcd/>
  13. <usedd/>
  14. <statflag/>
  15. <allflag/>
  16. <useddtmp/>
  17. </cond>
  18. <setinfo>
  19. <setlist/>
  20. </setinfo>
  21. </main>
  22. <send>
  23. <reqdata/>
  24. <savedata/>
  25. </send>
  26. <init/>
  27. <temp>
  28. <cond>
  29. <patientgrup>
  30. <patientgruplist>
  31. <patientnm/>
  32. <pid/>
  33. </patientgruplist>
  34. </patientgrup>
  35. </cond>
  36. </temp>
  37. </root>
  38. </instance>
  39. <script type="javascript" ev:event="xforms-ready">
  40. <![CDATA[
  41. fSearch() ;
  42. //model.makeNode("/root/init/roomcdgruptemp/roomcdgruplist");
  43. //model.copyNode("/root/init/roomcdgruptemp/roomcdgruplist", "/root/init/roomcdgrup/roomcdgruplist");
  44. //model.removeNodeset("/root/init/roomcdgrup/roomcdgruplist");
  45. //grd_setinfo.dispatch("xforms-value-changed");
  46. ]]>
  47. </script>
  48. <submission id="TRMNW19300" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" ref="/root/main/cond" replace="instance" resultref="/root/main/setinfo"/>
  49. <submission id="TXMNW19300" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  50. <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/codeinfo"/>
  51. <!-- 병동조회 -->
  52. <submission id="TRMNW04003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/wardcdgrup"/>
  53. <!-- 병실조회 -->
  54. <submission id="TRMNW04008" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/roomcdgrup"/>
  55. <!-- 환자조회 -->
  56. <submission id="TRMNR01004" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/cond/patientgrup"/>
  57. </model>
  58. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  59. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  63. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  65. <script type="javascript">
  66. <![CDATA[
  67. //model.setValue("/root/main/cond/usedd",getCurrentDate());
  68. model.setValue("/root/main/cond/useddtmp",getCurrentDate());
  69. input1.refresh();
  70. var dept = getUserInfo("dutplcecd");
  71. //cmb_deptcd.value = dept;
  72. model.setValue("/root/main/cond/deptcd",dept);
  73. model.refresh();
  74. //물품상태 하드코드 조회
  75. var pCode = "'Q02'"; // 조회할 CdGrupID 코드정보
  76. var pDate = getCurrentDate(); //조회기준일자
  77. fGetNursHardCdInfo(pCode, pDate);
  78. //submit("TRMNW11001", false);
  79. //addComboItem("cmb_deptcd", "전 체", "", "above");
  80. function fSearch() {
  81. //model.copyNode("/root/send/reqdata", "/root/main/cond");
  82. model.removenode("/root/send");
  83. submit("TRMNW19300");
  84. fGetWard() ;
  85. }
  86. function fGetWard(){
  87. submit("TRMNW04003"); //병동 조회
  88. fGetRoom() ;
  89. }
  90. function fGetRoom(){
  91. model.removeNodeset("/root/send");
  92. //model.makeValue("/root/send/wardcd",model.getValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/deptcd"));
  93. model.makeValue("/root/send/wardcd",model.getValue("/root/main/cond/deptcd"));
  94. submit("TRMNW04008"); //병실 조회
  95. //addComboItem("cmb_room", "전체", "", "above");
  96. }
  97. function checkGridUpdate(grid)
  98. {
  99. var iData = grid.getUpdateDataXml("insert");
  100. var uData = grid.getUpdateDataXml("update");
  101. var dData = grid.getUpdateDataXml("delete");
  102. if (iData=="" && uData=="" && dData=="") return false;
  103. else return true;
  104. }
  105. function fGetPatientList(){
  106. //model.removenode("/root/send");
  107. model.makeValue("/root/send/wardcd", model.getValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/deptcd"));
  108. model.makeValue("/root/send/roomcd", model.getValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/roomcd"));
  109. model.makeNode("/root/temp/cond/patientgrup/patientgruplist");
  110. if (submit("TRMNR01004")) {
  111. group2.visible = true;
  112. }
  113. //model.setfocus("cmb_patientgruplist");
  114. }
  115. ]]>
  116. </script>
  117. </xhtml:head>
  118. <xhtml:body pagewidth="1130" pageheight="505" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  119. <group id="group3" scroll="auto" style="left:0px; top:0px; width:1110px; height:505px; ">
  120. <caption id="cpt_title" class="tit_1" style="left:0px; top:0px; width:180px; height:13px; font-family:굴림; ">부서별 장비 이용도 관리</caption>
  121. <group id="grp_sea" style="left:0px; top:20px; width:1086px; height:40px; vertical-align:top; ">
  122. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1085px; height:40px; "/>
  123. <button id="btn_ref" class="btn1_letter2" navindex="7" style="left:897px; top:11px; width:56px; height:22px; ">
  124. <caption>조회</caption>
  125. <script type="javascript" ev:event="DOMActivate">
  126. <![CDATA[
  127. fSearch() ;
  128. ]]>
  129. </script>
  130. </button>
  131. <caption id="caption3" class="search_name" visibility="hidden" style="left:11px; top:10px; width:109px; height:17px; font-family:굴림; ">바코드번호 :</caption>
  132. <line id="line2" class="line_4" style="x1:885px; y1:10px; x2:885px; y2:31px; border-color:#ffe4bb; border-left-style:solid; "/>
  133. <caption id="caption29" class="search_name" style="left:10px; top:10px; width:67px; height:17px; font-family:굴림; ">부 서 :</caption>
  134. <select1 id="cmb_deptcd" ref="/root/main/cond/deptcd" class="combo_s_essential" navindex="1" appearance="minimal" style="left:80px; top:10px; width:125px; height:19px; font-family:굴림; ">
  135. <choices>
  136. <itemset nodeset="/root/init/wardcdgrup/wardcdgruplist">
  137. <label ref="wardnm"/>
  138. <value ref="wardcd"/>
  139. </itemset>
  140. </choices>
  141. <script type="javascript" ev:event="xforms-value-changed">
  142. <![CDATA[
  143. fSearch();
  144. ]]>
  145. </script>
  146. </select1>
  147. <button id="button2" class="btn1_letter2" navindex="8" style="left:1018px; top:11px; width:56px; height:22px; ">
  148. <caption>엑셀</caption>
  149. <script type="javascript" ev:event="DOMActivate">
  150. <![CDATA[
  151. var fileName = window.fileDialog("save", ",", false, "부서별 기자재 사용현황_" + getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  152. if (fileName != ""){
  153. grd_setinfo.saveExcel(fileName, "SheetName", true, true, "", "", "false");
  154. }
  155. ]]>
  156. </script>
  157. </button>
  158. <caption id="caption1" class="search_name" style="left:231px; top:11px; width:99px; height:17px; font-family:굴림; ">사용일자 :</caption>
  159. <input id="input1" ref="/root/main/cond/useddtmp" class="input_s_essential" disabled="true" navindex="2" inputtype="date" style="left:325px; top:11px; width:95px; height:19px; font-family:굴림; ">
  160. <script type="javascript" ev:event="xforms-value-changed">
  161. <![CDATA[
  162. ]]>
  163. </script>
  164. </input>
  165. <input id="input2" ref="/root/main/cond/fixasetcd" class="input_search" navindex="4" visibility="hidden" appearance="minimal" style="left:120px; top:10px; width:115px; height:19px; font-family:굴림; "/>
  166. <select id="rdo_allFlag" ref="/root/main/cond/allflag" class="radio_search" navindex="5" visibility="hidden" overflow="visible" appearance="full" cellspacing="5" cols="1" sep="^" vcellspacing="5" style="left:694px; top:10px; width:45px; height:20px; border-style:none; ">
  167. <choices>
  168. <item>
  169. <label>전체</label>
  170. <value>Y</value>
  171. </item>
  172. </choices>
  173. <script type="javascript" ev:event="xforms-value-changed">
  174. <![CDATA[
  175. var vAllflag = model.getValue("/root/main/cond/allflag");
  176. if("Y" == vAllflag){
  177. model.setValue("/root/main/cond/fixasetcd","");
  178. model.setValue("/root/main/cond/deptcd","");
  179. model.setValue("/root/main/cond/usedd","");
  180. fSearch()
  181. }
  182. //rdo_allFlag.dispatch("xforms-value-changed");
  183. ]]>
  184. </script>
  185. </select>
  186. <button id="btn_save" class="btn4_letter2" navindex="7" style="left:957px; top:11px; width:56px; height:22px; ">
  187. <caption>저장</caption>
  188. <script type="javascript" ev:event="DOMActivate">
  189. <![CDATA[
  190. if(!checkGridUpdate(grd_setinfo))
  191. {
  192. messageBox("저장할 자료가","I004");
  193. return;
  194. }
  195. if(getUserInfo("userid") != "ENR") {
  196. if(dept != model.getValue("/root/main/cond/deptcd")){
  197. messageBox("타부서는 저장할 수","I004");
  198. return;
  199. }
  200. }
  201. if(grd_setinfo.rows > 1){
  202. for(var i=1; i<grd_setinfo.rows; i++) {
  203. var status = grd_setinfo.rowstatus(i);
  204. if(status =="2"){
  205. if(model.getValue("/root/main/setinfo/setlist[" + i + "]/statcd") ==""){
  206. messageBox("운영상태를 선택하여 주십시오.", "I");
  207. return;
  208. }
  209. }
  210. }
  211. }
  212. model.makeValue("/root/send/savedata", grd_setinfo.getUpdateData());
  213. if(submit("TXMNW19300")){
  214. messageBox("저장","I002");//완료되었습니다.
  215. grd_setinfo.clearStatus();
  216. fSearch();
  217. }else{
  218. messageBox("저장","E009");//실패하였습니다.
  219. }
  220. ]]>
  221. </script>
  222. </button>
  223. <button id="btndrugend" class="btn2_letter3" navindex="12" visibility="visible" style="left:822px; top:12px; width:53px; height:19px; ">
  224. <caption>통계</caption>
  225. <script type="javascript" ev:event="onclick">
  226. <![CDATA[
  227. //modal("SPMNR05400");
  228. open("SPMNW18010",1,1,1);
  229. ]]>
  230. </script>
  231. </button>
  232. </group>
  233. <caption id="caption5" class="tit_2" style="left:5px; top:75px; width:195px; height:13px; font-family:굴림; ">부서별 기자재 사용리스트</caption>
  234. <line id="line1" class="line_1" style="x1:0px; y1:90px; x2:1090px; y2:90px; "/>
  235. <datagrid id="grd_setinfo" nodeset="/root/main/setinfo/setlist" class="datagrid2" caption="no^자산번호^사용일자^자산명^규격^사용부서^병실^환자명^운영상태^비고^입력일시^입력자^등록번호^입원일자^번호^엽력자ID" colsep="^" colwidth="0, 100, 80, 140, 120, 120, 60, 80, 55, 150, 101, 60, 100, 100, 100, 100" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:95px; width:1090px; height:385px; ">
  236. <col ref="callno"/>
  237. <col ref="fixasetcd" style="text-align:left; "/>
  238. <col ref="usedd" format="yyyy-mm-dd" style="text-align:center; "/>
  239. <col ref="goodnm" style="text-align:left; "/>
  240. <col ref="goodspec" style="text-align:left; "/>
  241. <col disabled="true" ref="deptcd" type="combo" style="text-align:center; ">
  242. <choices>
  243. <itemset nodeset="/root/init/wardcdgrup/wardcdgruplist">
  244. <label ref="wardnm"/>
  245. <value ref="wardcd"/>
  246. </itemset>
  247. </choices>
  248. </col>
  249. <col ref="roomcd" type="combo" style="text-align:center; ">
  250. <choices>
  251. <itemset nodeset="/root/init/roomcdgrup/roomcdgruplist">
  252. <label ref="roomnm"/>
  253. <value ref="roomcd"/>
  254. </itemset>
  255. </choices>
  256. </col>
  257. <col ref="hngnm" type="input" style="text-align:center; "/>
  258. <col ref="statcd" type="combo" style="text-align:center; ">
  259. <choices>
  260. <itemset nodeset="/root/init/codeinfo/codelist">
  261. <label ref="cdnm"/>
  262. <value ref="cdid"/>
  263. </itemset>
  264. </choices>
  265. </col>
  266. <col ref="etc" type="input"/>
  267. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn"/>
  268. <col ref="lastupdtrnm"/>
  269. <col ref="pid" visibility="hidden"/>
  270. <col ref="indd" visibility="hidden"/>
  271. <col ref="cretno" visibility="hidden"/>
  272. <col ref="lastupdtrid" visibility="hidden"/>
  273. <script type="javascript" ev:event="xforms-select">
  274. <![CDATA[
  275. //xforms-select
  276. if(grd_setinfo.col == grd_setinfo.colRef("deptcd")) {
  277. model.removeNodeset("/root/init/roomcdgrup/roomcdgruplist");
  278. fGetRoom();
  279. }
  280. if(grd_setinfo.col == grd_setinfo.colRef("roomcd")) {
  281. fGetPatientList();// 환자리스트 정보를 가져온다.
  282. grd_pidlist.refresh();
  283. }
  284. ]]>
  285. </script>
  286. <script type="javascript" ev:event="xforms-value-changed">
  287. <![CDATA[
  288. //xforms-select
  289. if(grd_setinfo.col == grd_setinfo.colRef("statcd")) {
  290. var vStatcd= (model.getValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/statcd"));
  291. if(vStatcd != "02"){
  292. model.setValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/roomcd", "");
  293. model.setValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/hngnm", "");
  294. model.setValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/pid", "");
  295. model.setValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/indd", "");
  296. model.setValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/cretno", "");
  297. }
  298. }
  299. ]]>
  300. </script>
  301. <script type="javascript" ev:event="onaftersort">
  302. <![CDATA[
  303. grd_setinfo.gridToInstance();
  304. ]]>
  305. </script>
  306. </datagrid>
  307. <group id="group2" visibility="hidden" style="left:720px; top:125px; width:235px; height:335px; background-color:#ffffcc; border-style:solid; ">
  308. <caption id="caption40" style="left:6px; top:4px; width:110px; height:20px; font-weight:bold; color:#3366ff; ">
  309. <![CDATA[>> 환자리스트]]>
  310. </caption>
  311. <button id="button64" class="btn2_letter2" style="left:173px; top:4px; width:42px; height:19px; ">
  312. <caption>취소</caption>
  313. <script type="javascript" ev:event="DOMActivate">
  314. <![CDATA[
  315. group2.visible = false;
  316. ]]>
  317. </script>
  318. </button>
  319. <datagrid id="grd_pidlist" nodeset="/root/temp/cond/patientgrup/patientgruplist" allowbigselection="true" autoresize="true" caption="등록번호^환자명" colsep="^" colwidth="100, 100" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:5px; top:27px; width:224px; height:290px; ">
  320. <col ref="pid"/>
  321. <col ref="patientnm"/>
  322. <script type="javascript" ev:event="ondblclick">
  323. <![CDATA[
  324. var row = grd_pidlist.mouseRow;
  325. if(row > 0){
  326. var hngnm = model.getValue("/root/temp/cond/patientgrup/patientgruplist[" + row + "]/patientnm");
  327. var pid = model.getValue("/root/temp/cond/patientgrup/patientgruplist[" + row + "]/pid");
  328. var indd = model.getValue("/root/temp/cond/patientgrup/patientgruplist[" + row + "]/indd");
  329. var cretno = model.getValue("/root/temp/cond/patientgrup/patientgruplist[" + row + "]/cretno");
  330. model.setValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/hngnm", hngnm);
  331. model.setValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/pid", pid);
  332. model.setValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/indd", indd);
  333. model.setValue("/root/main/setinfo/setlist[" + grd_setinfo.row + "]/cretno", cretno);
  334. grd_setinfo.rowstatus(grd_setinfo.row) = "2";
  335. grd_setinfo.refresh();
  336. group2.visible = false;
  337. //grd_pidlist.refresh();
  338. model.refresh();
  339. }
  340. ]]>
  341. </script>
  342. <script type="javascript" ev:event="onmousedown">
  343. <![CDATA[
  344. if (event.button == 3) {
  345. group2.visible = false;
  346. }
  347. ]]>
  348. </script>
  349. </datagrid>
  350. </group>
  351. </group>
  352. </xhtml:body>
  353. </xhtml:html>