SMMNB01220_야간순회보고.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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. <inpt>
  11. <reptdata>
  12. <wardlist>
  13. <status/>
  14. <duty/>
  15. <usernm/>
  16. <posdeptnm/>
  17. <delivecnts/>
  18. <wardcd/>
  19. <plandd/>
  20. <plandt/>
  21. <deliveflagcd/>
  22. <staiud/>
  23. <userid/>
  24. <certnm/>
  25. <certdt/>
  26. <dutflag/>
  27. <holiflag/>
  28. <basedd/>
  29. <holinm/>
  30. </wardlist>
  31. </reptdata>
  32. </inpt>
  33. <idct>
  34. <idctdlist/>
  35. <idctelist/>
  36. <idctnlist/>
  37. <rptlist/>
  38. </idct>
  39. </main>
  40. <send>
  41. <reqdata/>
  42. </send>
  43. <temp>
  44. <srchdd2/>
  45. <duty>1</duty>
  46. <deptflag/>
  47. <certnm/>
  48. <certdt/>
  49. <recdd/>
  50. <deptcd/>
  51. </temp>
  52. <hidden/>
  53. <init>
  54. <dutinfo/>
  55. </init>
  56. </root>
  57. </instance>
  58. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="urlencoded-post" replace="instance"/>
  59. <submission id="TRZSD00206" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  60. <submission id="TXMNB01204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden"/>
  61. <submission id="TRMNB01212" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/inpt/reptdata"/>
  62. <submission id="TRMNW00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/code/codelist"/>
  63. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  67. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  68. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  69. <script type="javascript" ev:event="xforms-ready">
  70. <![CDATA[
  71. //16.10.07_EMR.MNWHCAPL.DELIVEFLAGCD 설명
  72. //01.인사보고, 02.병동보고, 03.교육보고, 04.기타보고, 05.당직보고, 06.마취회복실 일일업무현황, 07.야간순회보고
  73. // 간호하드코딩 테이블 조회(I14 - 야간순회보고 조회가능 아이디)
  74. var pCode = "'I14'"; // 조회할 CdGrupID 코드정보
  75. var pDate = getCurrentDate(); //조회기준일자
  76. fGetNursHardCdInfo(pCode, pDate);
  77. var jobkindcd = getUserInfo("jobkindcd");
  78. var jobposcd = getUserInfo("jobposcd");
  79. var userid = getUserInfo("userid");
  80. var dutplcecd = getUserInfo("dutplcecd");
  81. var curTime= getCurrentTime().substr(0,4);
  82. if(curTime <= "0800") {
  83. ipt_orddd2.value = getAddDay(getCurrentDate(),-1);
  84. } else {
  85. ipt_orddd2.value = getCurrentDate();
  86. }
  87. // 간호부장, 과장, 수간호사 및 등록된 사용자만 조회가능토록
  88. if ( jobkindcd == "1140" && (jobposcd == "41" || jobposcd == "75" || jobposcd == "62" || getUserInfo("userid") == "ENR" || getUserInfo("userid") == model.getValue("/root/code/codeinfo/codelist[cdgrupid='I14' and cdid='"+getUserInfo("userid") +"']/cdid"))){
  89. btn_srch2.disabled = false;
  90. btn_excel2.disabled = false;
  91. button22.disabled = false;
  92. button23.disabled = false;
  93. btn_cert.disabled = false;
  94. ipt_orddd2.disabled = false;
  95. authflag = "Y";
  96. // rdo_deptflag.value = model.getValue("/root/code/codeinfo/codelist[cdgrupid='T52' and supcdid='"+dutplcecd+"']/cdid")
  97. } else {
  98. btn_srch2.disabled = true;
  99. btn_excel2.disabled = true;
  100. button22.disabled = true;
  101. button23.disabled = true;
  102. btn_cert.disabled = true;
  103. ipt_orddd2.disabled = true;
  104. authflag = "N";
  105. //messageBox("지정된 사용자 이외에는 조회", "E001");
  106. }
  107. fSearch_reptlist();
  108. // grd_wardlist.refresh();
  109. model.refresh();
  110. ]]>
  111. </script>
  112. </model>
  113. <script type="javascript">
  114. <![CDATA[
  115. var authflag = "";
  116. // 본원 야간 순회보고 저장
  117. function fSave_Reptrows2(){
  118. if(messageBox("","Q002") != 6) return;
  119. var updtdata = getGridUpdateData(grd_wardlist) ;
  120. model.removenode("/root/send");
  121. model.makeNode("/root/send");
  122. model.makeValue("/root/send/sReptPath" , updtdata);
  123. if(updtdata == null || updtdata == ""){
  124. messageBox("저장할 자료가 존재하지 않습니다.","I");
  125. return;
  126. }
  127. submit("TXMNB01204");
  128. btn_srch2.dispatch("DOMActivate");
  129. }
  130. // 야간 순회보고 조회
  131. function fSearch_reptlist(){
  132. var searchdd = ipt_orddd2.value.substr(0,6);
  133. var searchdd2 = ipt_orddd2.value;
  134. // var searchdd2 = ipt_orddd2.value;
  135. // alert("searchdd : " + searchdd);
  136. if(searchdd2.length < 8) {
  137. messageBox("보고일자를 다시 한 번", "C001");
  138. return;
  139. }
  140. model.removenodeset("/root/main/inpt/reptdata/wardlist");
  141. model.removenodeset("/root/send");
  142. model.makeNode("/root/send");
  143. model.makeValue("/root/send/reqdata/plandd", searchdd); //계획일자
  144. model.makeValue("/root/send/reqdata/deliveflagcd", "07"); //전달구분(야간순회보고 코드 : 07)
  145. // alert("authflag : " + authflag );
  146. if(authflag == "Y") {
  147. submit("TRMNB01212");
  148. } else {
  149. messageBox("지정된 사용자 이외에는 조회", "E001");
  150. return;
  151. }
  152. model.setValue(opt_certnm.attribute("ref"), model.getValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd2 +"']/certnm"));
  153. model.setValue(opt_certdt.attribute("ref"), model.getValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd2 +"']/certdt"));
  154. grd_wardlist.rebuildStyle();
  155. fSetColorHoliday();
  156. opt_certnm.refresh();
  157. opt_certdt.refresh();
  158. }
  159. function fUpt_Reptrows(grdflg){
  160. var wardcd = getUserInfo("dutplcecd");
  161. var plandd = model.getValue(ipt_orddd2.attribute("ref"));
  162. var plandt = getCurrentDate()+getCurrentTime().substring(0,4);
  163. if(grdflg == "wardlist"){
  164. var staiud = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud");
  165. if( (staiud =="insert") || (staiud =="delete") ){
  166. return;
  167. }
  168. var dt = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt");
  169. var basedd = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/basedd");
  170. if(dt == null || dt == "") {
  171. //model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",plandd);
  172. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",basedd);
  173. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt",plandt);
  174. }
  175. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","update");
  176. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/usernm",getUserName());
  177. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/userid",getUserId());
  178. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/deliveflagcd","07");
  179. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/wardcd", getUserInfo("dutplcecd"));
  180. }
  181. model.refresh();
  182. }
  183. // 일자별 표시기능
  184. function fSetColorHoliday(){
  185. for(var i=1;i<=grd_wardlist.rows;i++){
  186. var value = grd_wardlist.valueMatrix(i,grd_wardlist.colRef("dutflag") );
  187. if(value == "4"){
  188. grd_wardlist.cellstyle("color", i, 1, i, grd_wardlist.colRef("certdt")) = "#0000ee";
  189. grd_wardlist.cellstyle("background-color", i, 1, i, grd_wardlist.colRef("certdt")) = "#ffd3ff";
  190. }else if(value == "8"){
  191. grd_wardlist.cellstyle("color", i, 1, i, grd_wardlist.colRef("certdt")) = "#ee0000";
  192. grd_wardlist.cellstyle("background-color", i, 1, i, grd_wardlist.colRef("certdt")) = "#ffd3ff";
  193. }else
  194. grd_wardlist.cellstyle("color", i, 1, i, grd_wardlist.colRef("certdt")) = "#000000";
  195. }
  196. }
  197. function fDel_Reptrows(grdflg){
  198. var reptcnt;
  199. var selrow;
  200. if(grdflg == "wardlist"){
  201. reptcnt = grd_wardlist.rows;
  202. selrow = grd_wardlist.row;
  203. }
  204. // alert("selrow : " + selrow);
  205. if(reptcnt < 2 || selrow < grd_wardlist.fixedRows){
  206. messageBox("삭제 할 자료가","I004");
  207. return;
  208. }
  209. if(selrow == '' || selrow == null ){
  210. messageBox("선택된 셀이 ","I004");
  211. return;
  212. }
  213. if(grdflg == "wardlist"){
  214. model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","delete");
  215. grd_wardlist.rowStatus(grd_wardlist.row) = "4";
  216. }
  217. model.refresh();
  218. }
  219. ]]>
  220. </script>
  221. </xhtml:head>
  222. <xhtml:body pagewidth="1118" pageheight="810" guideline="1,1094;2,823;1,1216;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  223. <group id="group1" style="left:0px; top:0px; width:1094px; height:13px; "/>
  224. <group id="group2" style="left:0px; top:0px; width:1100px; height:765px; ">
  225. <button id="button16" class="btn2_letter2" visibility="hidden" style="left:960px; top:5px; width:42px; height:19px; ">
  226. <caption>축소</caption>
  227. <script type="javascript" ev:event="DOMActivate">
  228. <![CDATA[
  229. grd_wardlist.attribute("height") = "250";
  230. ]]>
  231. </script>
  232. </button>
  233. <line id="line10" class="line_1" style="x1:0px; y1:25px; x2:1094px; y2:25px; "/>
  234. <datagrid id="grd_wardlist" nodeset="/root/main/inpt/reptdata/wardlist" autoresize="true" caption="^날짜^요일^caption7^caption6^작성자^내용(부서 - CTRL + ENTER시 다음줄에 기입가능)^작성일시^작성일시^확인자^확인자ID^확인일시^SEQNO^caption5^caption4^caption3^caption2^caption1" colsep="^" colwidth="0, 80, 63, 17, 18, 75, 556, 0, 120, 62, 11, 100, 100, 0, 0, 0, 0" explorerbar="sort" rowheader="update" rowheight="100" rowsep="|" selectionmode="free" style="left:0px; top:30px; width:1095px; height:730px; vertical-align:middle; ">
  235. <col class="update_n" ref="status" visibility="hidden"/>
  236. <col ref="basedd" style="text-align:center; "/>
  237. <col ref="holinm" style="text-align:center; "/>
  238. <col ref="dutflag" visibility="hidden"/>
  239. <col ref="holiflag" visibility="hidden"/>
  240. <col ref="usernm" style="text-align:center; "/>
  241. <col ref="delivecnts" type="input"/>
  242. <col ref="plandd" visibility="hidden" format="yyyy-mm-dd" style="text-align:right; "/>
  243. <col ref="plandt" type="input" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  244. <col ref="certnm" style="text-align:center; "/>
  245. <col ref="certid" visibility="hidden"/>
  246. <col ref="certdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  247. <col ref="seqno" visibility="hidden"/>
  248. <col ref="wardcd" visibility="hidden"/>
  249. <col ref="deliveflagcd" visibility="hidden"/>
  250. <col ref="staiud" visibility="hidden"/>
  251. <col ref="userid" visibility="hidden"/>
  252. <script type="javascript" ev:event="xforms-value-changed">
  253. <![CDATA[
  254. fUpt_Reptrows("wardlist");
  255. ]]>
  256. </script>
  257. <script type="javascript" ev:event="onaftersort">
  258. <![CDATA[
  259. grd_wardlist.gridToInstance();
  260. grd_wardlist.resizeCells();
  261. ]]>
  262. </script>
  263. </datagrid>
  264. <button id="button10" class="btn2_letter3" visibility="hidden" style="left:865px; top:5px; width:53px; height:19px; ">
  265. <caption>행추가</caption>
  266. <script type="javascript" ev:event="DOMActivate">
  267. <![CDATA[
  268. fAdd_Reptrows("wardlist");
  269. ]]>
  270. </script>
  271. </button>
  272. <button id="button22" class="btn1_letter2" style="left:978px; top:3px; width:56px; height:22px; ">
  273. <caption>삭제</caption>
  274. <script type="javascript" ev:event="DOMActivate">
  275. <![CDATA[
  276. fDel_Reptrows("wardlist");
  277. ]]>
  278. </script>
  279. </button>
  280. <caption id="caption17" class="tit_2" style="left:0px; top:10px; width:115px; height:15px; ">야간순회보고</caption>
  281. <button id="button23" class="btn1_letter2" style="left:1035px; top:3px; width:56px; height:22px; ">
  282. <caption>저장</caption>
  283. <script type="javascript" ev:event="DOMActivate">
  284. <![CDATA[
  285. fSave_Reptrows2();
  286. ]]>
  287. </script>
  288. </button>
  289. <button id="button14" class="btn2_letter2" visibility="hidden" style="left:915px; top:5px; width:42px; height:19px; ">
  290. <caption>확대</caption>
  291. <script type="javascript" ev:event="DOMActivate">
  292. <![CDATA[
  293. grd_wardlist.attribute("height") = "644";
  294. ]]>
  295. </script>
  296. </button>
  297. <button id="btn_srch2" class="btn1_letter2" navindex="5" style="left:864px; top:3px; width:56px; height:22px; ">
  298. <caption>조회</caption>
  299. <script type="javascript" ev:event="DOMActivate">
  300. <![CDATA[
  301. fSearch_reptlist();
  302. ]]>
  303. </script>
  304. </button>
  305. <caption id="caption21" class="search_name" style="left:670px; top:6px; width:86px; height:17px; ">보고일자 :</caption>
  306. <input id="ipt_orddd2" ref="/root/temp/srchdd2" class="input_default" navindex="1" inputtype="date" style="left:760px; top:5px; width:100px; height:19px; ">
  307. <script type="javascript" ev:event="xforms-value-changed">
  308. <![CDATA[
  309. fSearch_reptlist();
  310. ]]>
  311. </script>
  312. </input>
  313. <button id="btn_excel2" class="btn1_letter2" style="left:921px; top:3px; width:56px; height:22px; ">
  314. <caption>엑셀</caption>
  315. <script type="javascript" ev:event="DOMActivate">
  316. <![CDATA[
  317. // saveExcelAll( "grd_wardlist|부서관리"
  318. // ,"grd_psnlist|인사관리"
  319. // ,"grd_edulist|교육및회의"
  320. // ,"grd_etclist|기타"
  321. // ,"grd_noti|당직보고"
  322. // , true);
  323. // var sTitle = "야간순회보고"
  324. // var fileName = window.fileDialog("save", ",", false, sTitle, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  325. // if (fileName != ""){
  326. // grd_wardlist.saveExcel(fileName, sTitle, true, true, "", "", true);
  327. // }
  328. if (grd_wardlist.rows <= 1) {
  329. messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  330. return;
  331. }
  332. var fileName = window.fileDialog("save", ",", false, "야간순회보고", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  333. if (fileName != ""){
  334. grd_wardlist.saveExcel(fileName, "SheetName", false, false, "", "", false);
  335. }
  336. ]]>
  337. </script>
  338. </button>
  339. </group>
  340. <button id="btn_cert" class="btn2_letter2" style="left:870px; top:768px; width:42px; height:19px; ">
  341. <caption>확인</caption>
  342. <script type="javascript" ev:event="DOMActivate">
  343. <![CDATA[
  344. var searchdd = ipt_orddd2.value;
  345. var sseq = model.getValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/seqno")
  346. if(sseq == null || sseq == ""){
  347. messageBox(searchdd + " 일자의 야간순회보고가 작성되지 않았습니다.","E");
  348. return;
  349. }
  350. if(messageBox(searchdd + "일자에 확인","Q002") != 6) return;
  351. model.setValue(opt_certnm.attribute("ref"), getUserInfo("usernm"));
  352. model.setValue(opt_certdt.attribute("ref"), getCurrentDate() + getCurrentTime());
  353. opt_certnm.refresh();
  354. opt_certdt.refresh();
  355. // alert(ipt_orddd2.value);
  356. // alert("test : " + model.getValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/basedd"));
  357. model.setValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/certid", getUserInfo("userid"));
  358. model.setValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/certdt", getCurrentDate() + getCurrentTime());
  359. model.setValue("/root/main/inpt/reptdata/wardlist[basedd = '"+ searchdd +"']/staiud", "update");
  360. grd_wardlist.rowStatus(grd_wardlist.findRow(searchdd, grd_wardlist.fixedRows, grd_wardlist.colRef("basedd"), false, false)) = 2;
  361. var updtdata = getGridUpdateData(grd_wardlist) ;
  362. model.removenode("/root/send");
  363. model.makeNode("/root/send");
  364. model.makeValue("/root/send/sReptPath" , updtdata);
  365. // alert("updtdata : " + updtdata);
  366. if(updtdata == null || updtdata == ""){
  367. messageBox("저장할 자료가 존재하지 않습니다.","I");
  368. return;
  369. }
  370. if(submit("TXMNB01204")) {
  371. messageBox("저장되었습니다.", "I");
  372. fSearch_reptlist();
  373. }
  374. ]]>
  375. </script>
  376. </button>
  377. <output id="opt_certdt" ref="/root/temp/certdt" class="output_fix" format="yyyy-mm-dd hh:nn" style="left:978px; top:768px; width:100px; height:19px; text-align:center; "/>
  378. <output id="opt_certnm" ref="/root/temp/certnm" class="output_fix" style="left:915px; top:768px; width:60px; height:19px; text-align:center; "/>
  379. </xhtml:body>
  380. </xhtml:html>