SMANT01200_마감후식사처방수정승인.xrw 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <data>
  11. <check/>
  12. <h_pid/>
  13. <ward/>
  14. <room/>
  15. <hngnm/>
  16. <prcpdd/>
  17. <dietmeal/>
  18. <updtbfdiet/>
  19. <updtaftdiet/>
  20. <updtreqdt/>
  21. <reqflag/>
  22. <updtreqcnt/>
  23. <updtreqpsn/>
  24. <updtaprvyn/>
  25. <aprvpsn/>
  26. <aprvdt/>
  27. <drugpackflag/>
  28. <bfprcpdelivefact/>
  29. <prcpdelivefact/>
  30. <reqcancel/>
  31. <ordrslt/>
  32. <dschtype/>
  33. </data>
  34. </main>
  35. <send>
  36. <searchitem>
  37. <ward/>
  38. <reqfromdd/>
  39. <reqtodd/>
  40. <dietmeal/>
  41. <srchflag/>
  42. <hngnm/>
  43. <instcd/>
  44. <userid/>
  45. <sumdd/>
  46. <dietmeal2/>
  47. </searchitem>
  48. <data>
  49. <reqflag/>
  50. <aprvlist/>
  51. <reqclist/>
  52. </data>
  53. </send>
  54. <temp>
  55. <ret>
  56. <retmsg/>
  57. </ret>
  58. </temp>
  59. <init>
  60. <basecode>
  61. <meal>
  62. <A0055>
  63. <cdid/>
  64. <cdnm/>
  65. </A0055>
  66. </meal>
  67. <ward>
  68. <dept>
  69. <deptcd/>
  70. <depthngnm/>
  71. </dept>
  72. </ward>
  73. <aprvrslt>
  74. <A0433>
  75. <cdid/>
  76. <cdnm/>
  77. </A0433>
  78. </aprvrslt>
  79. </basecode>
  80. </init>
  81. </root>
  82. </instance>
  83. <script type="javascript" ev:event="xforms-ready">
  84. <![CDATA[
  85. finit();
  86. btn_search.disabled = !checkAuth("R");
  87. btn_save.disabled = !checkAuth("X");
  88. btn_aprv.disabled = !checkAuth("X");
  89. btn_excel.disabled = !checkAuth("P");
  90. btn_updtsum.disabled = !checkAuth("X");
  91. model.setValue("/root/send/searchitem/instcd", getUserInfo("dutplceinstcd"));
  92. model.setValue("/root/send/searchitem/userid", getUserInfo("userid"));
  93. //var posdeptcd = getUserInfo("posdeptcd"); //소속부서코드
  94. var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
  95. //간호사가 로그인했을 경우
  96. if ( dutplcecd.substr(0,3) != "325" ) {
  97. //화면타이틀 다르게 보여주기
  98. document.title = "식사처방수정결과 조회";
  99. caption1.visible = false;
  100. caption6.visible = true;
  101. //조회,저장을 제외한 버튼 숨기기
  102. btn_dietprcpprint.visible = false;
  103. btn_aprv.visible = false;
  104. btn_updtsum.visible = false;
  105. //처리결과 콤보 비활성화
  106. grd_data.colDisabled(grd_data.colRef("updtaprvyn")) = true;
  107. //로그인한 간호사의 소속병동으로 데이터 자동조회
  108. model.setValue("/root/send/searchitem/ward", dutplcecd);
  109. model.setValue("/root/send/searchitem/dietmeal", "0");
  110. btn_search.dispatch("DOMActivate");
  111. }else{
  112. //요청취소 체크박스 비활성화
  113. grd_data.colDisabled(grd_data.colRef("reqcancel")) = true;
  114. }
  115. ]]>
  116. </script>
  117. <script type="javascript">
  118. <![CDATA[
  119. function finit() {
  120. var instcd = getUserInfo("dutplceinstcd");
  121. // 화면open시 공통코드 setting
  122. zbcfGetCodeList( new Array( "A0055", "A0433" ), new Array( "/root/init/basecode/meal", "/root/init/basecode/aprvrslt" ) );
  123. //zbcfGetDeptCodeList( instcd, 'orduseyn', 'W', '/root/init/basecode/ward');
  124. zsdfGetWardDeptList(instcd, '/root/init/basecode/ward', 'depthngnm', 'asc', new Date().getDateFormat("YYYYMMDD"), 'after');
  125. model.setValue("/root/send/searchitem/reqfromdd", getCurrentDate());
  126. model.setValue("/root/send/searchitem/reqtodd", getCurrentDate());
  127. model.resetInstanceNode("/root/send/data");
  128. model.removeNodeset("/root/main/data");
  129. //화면open시 현재시간을 계산하여 끼니 자동setting
  130. //각 끼니별 2차 마감시간으로부터 2시간후까지는 이전끼니로 setting
  131. var tm = getCurrentTime();
  132. if ( tm.substr(0,4) <= 0830 ) { //조식 2차 마감시간은 06:30
  133. //if ( tm.substr(0,4) <= 0630 ) {
  134. model.setValue("/root/send/searchitem/dietmeal", "1");
  135. } else if ( (tm.substr(0,4) > 0830) && (tm.substr(0,4) <= 1330) ) { //중식 2차 마감시간은 11:30
  136. //} else if ( (tm.substr(0,4) > 0630) && (tm.substr(0,4) <= 1130) ) {
  137. model.setValue("/root/send/searchitem/dietmeal", "2");
  138. } else {
  139. model.setValue("/root/send/searchitem/dietmeal", "3");
  140. }
  141. model.refresh();
  142. }
  143. ]]>
  144. </script>
  145. <submission id="TRZBC00101"/>
  146. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  147. <submission id="TRANT01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
  148. <submission id="TXANT01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" resultref="/root/temp"/>
  149. <submission id="TXANT01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/temp"/>
  150. </model>
  151. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  152. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  153. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  154. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  155. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  156. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  157. </xhtml:head>
  158. <xhtml:body guideline="1,1194;2,747;1,899;1,966;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  159. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  160. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">마감후식사처방수정승인</caption>
  161. <caption id="caption6" class="tit_1" visibility="hidden" style="left:0px; top:0px; width:189px; height:14px; ">식사처방수정결과 조회</caption>
  162. </group>
  163. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; color:#FF8888; ">
  164. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  165. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; "/>
  166. <caption id="caption2" class="search_name" style="left:556px; top:8px; width:64px; height:17px; ">병동 :</caption>
  167. <button id="btn_search" class="btn1_letter2" style="left:1122px; top:7px; width:56px; height:22px; ">
  168. <caption>조회</caption>
  169. <script type="javascript" ev:event="DOMActivate">
  170. <![CDATA[
  171. var fromdd = model.getValue("/root/send/searchitem/reqfromdd");
  172. var todd = model.getValue("/root/send/searchitem/reqtodd");
  173. if (getDateInterval(fromdd, todd) < 0) {
  174. messageBox("조회 시작일은 종료일보다 클 수", "I004");
  175. return;
  176. } else {
  177. if (submit("TRANT01201")) {
  178. var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
  179. grd_data.rebuildStyle();
  180. for (var i = 1; i < grd_data.rows; i ++) {
  181. //처방일자가 오늘이 아닌 경우 처리결과 및 요청취소 입력 불가능
  182. if (model.getValue("/root/main/data[" + i + "]/prcpdd") != getCurrentDate()) {
  183. grd_data.isReadOnly(i, 14) = true;
  184. grd_data.isReadOnly(i, 18) = true;
  185. }
  186. //영양사가 로그인한 경우 요청취소 입력 불가능
  187. //영양사가 로그인하고 이미 승인 처리한 경우 처리결과 입력 불가능
  188. else if (dutplcecd.substr(0,3) == "325") {
  189. grd_data.isReadOnly(i, 18) = true;
  190. if (model.getValue("/root/main/data["+ i +"]/updtaprvyn") == "Y") {
  191. grd_data.isReadOnly(i, 14) = true;
  192. } else {
  193. grd_data.isReadOnly(i, 14) = false;
  194. }
  195. }
  196. //간호사가 로그인한 경우 처리결과 입력 불가능
  197. //간호사가 로그인하고 영양팀에서 이미 처리결과를 입력한 경우 요청취소 입력 불가능
  198. else {
  199. grd_data.isReadOnly(i, 14) = true;
  200. if (model.getValue("/root/main/data["+ i +"]/updtaprvyn") != "") {
  201. grd_data.isReadOnly(i, 18) = true;
  202. } else {
  203. grd_data.isReadOnly(i, 18) = false;
  204. }
  205. }
  206. // ordrslt=4 사망환자 성명에 빨간색으로 표기_김금련 2012.12.10
  207. if(model.getValue("/root/main/data["+i+"]/ordrslt") == "4") {
  208. grd_data.cellStyle("background-color" , i , grd_data.colRef("hngnm") , i , grd_data.colRef("hngnm")) = "#FF8888"; //빨강
  209. } else if (model.getValue("/root/main/data["+i+"]/dschtype") == "G") {
  210. grd_data.cellStyle("background-color" , i , grd_data.colRef("hngnm") , i , grd_data.colRef("hngnm")) = "#FFCC66"; //주황
  211. }
  212. }
  213. model.refresh();
  214. }
  215. }
  216. ]]>
  217. </script>
  218. </button>
  219. <line id="line13" style="x1:1106px; y1:7px; x2:1106px; y2:29px; "/>
  220. <select1 id="cmb_ward" ref="/root/send/searchitem/ward" class="combo_s_essential" appearance="minimal" style="left:617px; top:7px; width:100px; height:19px; ">
  221. <choices>
  222. <itemset nodeset="/root/init/basecode/ward/dept">
  223. <label ref="depthngnm"/>
  224. <value ref="deptcd"/>
  225. </itemset>
  226. </choices>
  227. </select1>
  228. <caption id="caption3" class="search_name" style="left:11px; top:8px; width:64px; height:17px; ">일자 :</caption>
  229. <input id="ipt_reqfromdd" ref="/root/send/searchitem/reqfromdd" class="input_s_essential" inputtype="date" style="left:70px; top:7px; width:90px; height:19px; "/>
  230. <caption id="caption11" class="search_n_b" style="left:162px; top:9px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  231. <input id="ipt_reqtodd" ref="/root/send/searchitem/reqtodd" class="input_s_essential" inputtype="date" style="left:175px; top:7px; width:90px; height:19px; "/>
  232. <caption id="caption4" class="search_name" style="left:291px; top:8px; width:64px; height:17px; ">끼니 :</caption>
  233. <select1 id="rdo_diet" ref="/root/send/searchitem/dietmeal" class="radio_search" appearance="full" cellspacing="2" cols="4" rows="1" overflow="visible" style="left:351px; top:8px; width:189px; height:19px; ">
  234. <choices>
  235. <item>
  236. <label>조식</label>
  237. <value>1</value>
  238. </item>
  239. <item>
  240. <label>중식</label>
  241. <value>2</value>
  242. </item>
  243. <item>
  244. <label>석식</label>
  245. <value>3</value>
  246. </item>
  247. <item>
  248. <label>전체</label>
  249. <value>0</value>
  250. </item>
  251. </choices>
  252. </select1>
  253. <caption id="caption12" class="search_name" style="left:750px; top:8px; width:126px; height:17px; ">환자명 :</caption>
  254. <input id="ipt_hngnm" ref="/root/send/searchitem/hngnm" class="input_search" style="left:825px; top:8px; width:65px; height:19px; ">
  255. <script type="javascript" ev:event="onkeydown">
  256. <![CDATA[
  257. inputEnterKey("btn_search", "DOMActivate");
  258. ]]>
  259. </script>
  260. </input>
  261. <caption id="caption5" class="search_name" style="left:918px; top:8px; width:86px; height:17px; ">조회구분 :</caption>
  262. <select1 id="cmb_srchflag" ref="/root/send/searchitem/srchflag" class="combo_s_essential" appearance="minimal" style="left:1005px; top:8px; width:75px; height:19px; ">
  263. <choices>
  264. <itemset nodeset="/root/init/basecode/aprvrslt/A0433">
  265. <label ref="cdnm"/>
  266. <value ref="cdid"/>
  267. </itemset>
  268. </choices>
  269. </select1>
  270. </group>
  271. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  272. <button id="btn_excel" class="btn2_letter2" style="left:1145px; top:49px; width:42px; height:19px; ">
  273. <caption>엑셀</caption>
  274. <script type="javascript" ev:event="DOMActivate">
  275. <![CDATA[
  276. var filename = window.fileDialog("save", ",", false, "DietPrcpUpdtAprv_list", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  277. if (filename != "") {
  278. grd_data.saveExcel(filename, "grd_data", true, false, "", "", "");
  279. }
  280. ]]>
  281. </script>
  282. </button>
  283. <button id="btn_aprv" class="btn2_letter4" visibility="hidden" style="left:1062px; top:49px; width:80px; height:19px; ">
  284. <caption>일괄승인</caption>
  285. <script type="javascript" ev:event="DOMActivate">
  286. <![CDATA[
  287. for ( i=1; i<grd_data.rows; i++ ) {
  288. model.setValue("/root/main/data["+ i +"]/updtaprvyn", "Y");
  289. }
  290. grd_data.refresh();
  291. ]]>
  292. </script>
  293. </button>
  294. <shape id="rectangle1" appearance="rectangle" style="left:10px; top:50px; width:15px; height:15px; background-color:#FF8888; "/>
  295. <caption id="caption7" style="left:25px; top:49px; width:55px; height:20px; ">사망환자</caption>
  296. <shape id="rectangle2" appearance="rectangle" style="left:85px; top:50px; width:15px; height:15px; background-color:#ffcc66; "/>
  297. <caption id="caption8" style="left:100px; top:49px; width:70px; height:20px; ">가퇴원환자</caption>
  298. </group>
  299. <datagrid id="grd_data" nodeset="/root/main/data" caption="선택^h_등록번호^병동^병실^환자명^처방일자^끼니^수정전^특이사항^수정후^수정요청시간^요청구분^요청횟수^요청자^처리결과^처리담당자^처리시간^수정사유^사유내역^보호자식구분^요청취소^사망여부^가퇴원여부" colsep="^" colwidth="32, 10, 79, 50, 70, 70, 45, 160, 117, 170, 105, 60, 58, 50, 60, 70, 105, 70, 80,10, 60, 20,20" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:88px; width:1194px; height:659px; text-align:center; ">
  300. <col checkvalue="Y,N" ref="check" type="checkbox" visibility="hidden" style="left:20px; top:23px; width:32px; height:23px; "/>
  301. <col ref="h_pid" visibility="hidden"/>
  302. <col disabled="true" ref="ward" type="combo">
  303. <choices>
  304. <itemset nodeset="/root/init/basecode/ward/dept">
  305. <label ref="depthngnm"/>
  306. <value ref="deptcd"/>
  307. </itemset>
  308. </choices>
  309. </col>
  310. <col ref="room"/>
  311. <col ref="hngnm"/>
  312. <col ref="prcpdd" format="yyyy-mm-dd"/>
  313. <col disabled="true" ref="dietmeal" type="combo">
  314. <choices>
  315. <itemset nodeset="/root/init/basecode/meal/A0055">
  316. <label ref="cdnm"/>
  317. <value ref="cdid"/>
  318. </itemset>
  319. </choices>
  320. </col>
  321. <col ref="updtbfdiet" style="text-align:left; "/>
  322. <col ref="bfprcpdelivefact" style="text-align:left; "/>
  323. <col ref="updtaftdiet" style="text-align:left; "/>
  324. <col ref="updtreqdt" format="yyyy-mm-dd hh:nn"/>
  325. <col disabled="true" ref="reqflag" type="combo">
  326. <choices>
  327. <item>
  328. <label>신규</label>
  329. <value>I</value>
  330. </item>
  331. <item>
  332. <label>수정</label>
  333. <value>U</value>
  334. </item>
  335. <item>
  336. <label>삭제</label>
  337. <value>C</value>
  338. </item>
  339. </choices>
  340. </col>
  341. <col ref="updtreqcnt"/>
  342. <col ref="updtreqpsn"/>
  343. <col ref="updtaprvyn" type="combo">
  344. <choices>
  345. <item>
  346. <label/>
  347. <value/>
  348. </item>
  349. <item>
  350. <label>승인</label>
  351. <value>Y</value>
  352. </item>
  353. <item>
  354. <label>불허</label>
  355. <value>N</value>
  356. </item>
  357. </choices>
  358. </col>
  359. <col ref="aprvpsn" style="left:1156px; top:23px; width:70px; height:23px; "/>
  360. <col ref="aprvdt" format="yyyy-mm-dd hh:nn"/>
  361. <col ref="modreason"/>
  362. <col ref="modreasondesc"/>
  363. <col ref="drugpackflag" visibility="hidden"/>
  364. <col checkvalue="Y,N" ref="reqcancel" type="checkbox"/>
  365. <col ref="ordrslt" visibility="hidden"/>
  366. <col ref="dschtype"/>
  367. <script type="javascript" ev:event="onentercell">
  368. <![CDATA[
  369. var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
  370. //영양사 로그인
  371. if (dutplcecd.substr(0,3) == "325") {
  372. /*
  373. 일자를 막지 않으면 과거처방의 수정도 가능
  374. 과거일자 처방 수정시 활용 할 수 있음.
  375. */
  376. if ( grd_data.col == grd_data.colRef("updtaprvyn") ) { // 현재 선택한 열과 그리드상의 컬럼값에 의한 열의 인덱스를 비교
  377. //처방일자가 오늘이 아니면 처리결과 입력 불가능
  378. if ( model.getValue("/root/main/data["+ grd_data.row +"]/prcpdd") != getCurrentDate() ) {
  379. //messageBox("오늘 식사처방이 아니면 처리", "E001");
  380. //model.setValue("/root/main/data["+ grd_data.row +"]/updtaprvyn", "");
  381. //model.refresh();
  382. return;
  383. }
  384. //이미 승인 처리한 경우 처리결과 입력 불가능
  385. else if ( model.getValue("/root/main/data["+ grd_data.row +"]/updtaprvyn") == "Y" ) {
  386. messageBox("이미 승인한 건은 수정", "E001");
  387. return;
  388. }
  389. }
  390. }
  391. //간호사 로그인
  392. else {
  393. if ( grd_data.col == grd_data.colRef("reqcancel")) { // 현재 선택한 열과 그리드상의 컬럼값에 의한 열의 인덱스를 비교
  394. //처방일자가 오늘이 아니면 요청취소 불가능
  395. if ( model.getValue("/root/main/data["+ grd_data.row +"]/prcpdd") != getCurrentDate() ) {
  396. messageBox("오늘 식사처방이 아니면 취소", "E001");
  397. return;
  398. }
  399. //영양팀에서 이미 처리결과를 입력한 경우 요청취소 불가능
  400. else if ( model.getValue("/root/main/data["+ grd_data.row +"]/updtaprvyn") != "" ) {
  401. messageBox("영양팀에서 이미 처리한 건은 취소", "E001");
  402. return;
  403. }
  404. }
  405. }
  406. ]]>
  407. </script>
  408. </datagrid>
  409. <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  410. <button id="btn_dietprcpprint" class="btn4_letter6" style="left:1px; top:4px; width:128px; height:22px; ">
  411. <caption>식사처방출력</caption>
  412. <script type="javascript" ev:event="DOMActivate">
  413. <![CDATA[
  414. //navigate("SMANC00300", 0,100,150, "SMANC00300", "/root/send/openpopup", "/root/main/receivedata");
  415. //navigate("SMANT00100", 0,100,150, "SMANT00100");
  416. open("SMANT00100", "","","", "SMANT00100");
  417. ]]>
  418. </script>
  419. </button>
  420. <button id="btn_updtsum" class="btn4_letter4" visibility="hidden" style="left:134px; top:4px; width:80px; height:22px; ">
  421. <caption>변경집계</caption>
  422. <script type="javascript" ev:event="DOMActivate">
  423. <![CDATA[
  424. // if ( messageBox("변경집계를", "Q004") == 6 ) {
  425. // //필수입력항목 체크
  426. // if ( rdo_diet.value == "0" ) {
  427. // messageBox("승인한 식사처방의 집계를 위하여 조식,중식,석식 중", "C002");
  428. // return;
  429. // }
  430. // model.makeNode("/root/send/searchitem/batchflag");
  431. // model.setValue("/root/send/searchitem/batchflag", "manual"); //batch 실행구분=수동
  432. // submit("TXANT01202");
  433. // if ( model.getValue("/root/temp/ret/retmsg") == "OK" ) {
  434. // messageBox("변경집계가", "I002");
  435. // }
  436. // } else { return; }
  437. ]]>
  438. </script>
  439. </button>
  440. <button id="btn_save" class="btn4_letter2" style="left:1138px; top:4px; width:56px; height:22px; ">
  441. <caption>저장</caption>
  442. <script type="javascript" ev:event="DOMActivate">
  443. <![CDATA[
  444. //rowStatus 체크
  445. // for (var i = 1; i < grd_data.rows; i ++) {
  446. // alert(grd_data.rowStatus(i));
  447. // }
  448. var temp = getGridUpdateData(grd_data);
  449. var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
  450. //로그인한 사용자가 영양팀일 경우
  451. if (dutplcecd.substr(0,3) == "325") {
  452. if ( temp == "" ) {
  453. messageBox("승인한 데이터가", "I004");
  454. } else {
  455. if ( messageBox("", "Q002") == 6 ) {
  456. model.setValue("/root/send/data/reqflag", 'O'); //영양팀 구분자(O) 세팅
  457. model.setValue("/root/send/data/aprvlist", grd_data.getUpdateData());
  458. if (submit("TXANT01201")) { //승인여부 저장 및 식사처방 수정
  459. // model.setValue("/root/send/searchitem/sumdd", getCurrentDate());
  460. model.setValue("/root/send/searchitem/sumdd", model.getValue("/root/main/data["+ grd_data.row +"]/prcpdd")); // 과거 식사처방 승인시 과거 처방일자 넘김. 2011.08.11_김금련
  461. for ( i=1; i<4; i++ ) { //끼니별 변경집계 수행
  462. model.setValue("/root/send/searchitem/dietmeal2", i);
  463. submit("TXANT01202");
  464. }
  465. }
  466. } else { return; }
  467. }
  468. submit("TRANT01201"); //재조회
  469. }
  470. //로그인한 사용자가 간호팀인 경우
  471. else {
  472. if ( temp == "" ) {
  473. messageBox("취소 선택한 데이터가", "I004");
  474. } else {
  475. if ( messageBox("", "Q002") == 6 ) {
  476. model.setValue("/root/send/data/reqflag", 'N'); //간호팀 구분자(N) 세팅
  477. model.setValue("/root/send/data/reqclist", grd_data.getUpdateData());
  478. submit("TXANT01201"); //취소 처리
  479. } else { return; }
  480. }
  481. submit("TRANT01201"); //재조회
  482. }
  483. btn_search.dispatch("DOMActivate");
  484. //btn_updtsum.dispatch("DOMActivate"); //저장후 변경집계 자동수행
  485. ]]>
  486. </script>
  487. </button>
  488. </group>
  489. </xhtml:body>
  490. </xhtml:html>