SPPMB02000_미예약변경.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  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. <orddrid/>
  11. <orddeptcd/>
  12. <result/>
  13. <norsrv>
  14. <norsrvlist/>
  15. </norsrv>
  16. </main>
  17. <send>
  18. <orddrid/>
  19. <orddeptcd/>
  20. <updatedata>
  21. <datalist/>
  22. </updatedata>
  23. </send>
  24. <init>
  25. <P0037list>
  26. <P0037>
  27. <cdnm/>
  28. <cdid/>
  29. </P0037>
  30. </P0037list>
  31. <P0406list>
  32. <P0406>
  33. <cdnm/>
  34. <cdid/>
  35. </P0406>
  36. </P0406list>
  37. <orddeptcd>
  38. <orddeptcdlist>
  39. <cd/>
  40. <nm/>
  41. </orddeptcdlist>
  42. </orddeptcd>
  43. <orddrid>
  44. <orddridlist>
  45. <cd/>
  46. <nm/>
  47. <dp/>
  48. <sp/>
  49. </orddridlist>
  50. </orddrid>
  51. </init>
  52. <hidden>
  53. <outrsrvupdtendyn>
  54. <items>
  55. <label>Y</label>
  56. <value>Y</value>
  57. </items>
  58. <items>
  59. <label>N</label>
  60. <value>N</value>
  61. </items>
  62. </outrsrvupdtendyn>
  63. <outrsrvupdtendyn2>
  64. <items>
  65. <label>Y</label>
  66. <value>Y</value>
  67. </items>
  68. <items>
  69. <label>N</label>
  70. <value>N</value>
  71. </items>
  72. </outrsrvupdtendyn2>
  73. <outrsrvupdtendyn3>
  74. <items>
  75. <label>Y</label>
  76. <value>Y</value>
  77. </items>
  78. <items>
  79. <label>N</label>
  80. <value>N</value>
  81. </items>
  82. </outrsrvupdtendyn3>
  83. </hidden>
  84. <temp/>
  85. </root>
  86. </instance>
  87. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  88. <script type="javascript" ev:event="xforms-ready">
  89. <![CDATA[
  90. zbcfGetCodeList(new Array("P0037","P0406"), new Array("/root/init/P0037list","/root/init/P0406list"));
  91. pamGetDeptCDDrIDList();
  92. model.refresh();
  93. fInitialize();
  94. ]]>
  95. </script>
  96. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  97. <submission id="TRPMB02001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/norsrv"/>
  98. <submission id="TXPMB02002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
  99. </model>
  100. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  101. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  102. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  103. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  104. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  105. <script type="javascript">
  106. <![CDATA[
  107. function fInitialize(){
  108. model.resetInstanceNode("/root/send");
  109. model.resetInstanceNode("/root/main");
  110. model.resetInstanceNode("/root/main/norsrvlist");
  111. model.refresh();
  112. }
  113. //미예약 현황 조회
  114. function fSearchOutNoRsrvList(){
  115. model.resetInstanceNode("/root/send");
  116. model.setValue("/root/send/orddrid", model.getValue("/root/main/orddrid"));
  117. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
  118. if(submit("TRPMB02001")) {
  119. var rows = grd_rsrvchg.rows;
  120. var fixedRows = grd_rsrvchg.fixedRows;
  121. var dataRows = rows - fixedRows;
  122. for (var i = dataRows ; i>0; i--){
  123. if(model.getValue("/root/main/norsrv/norsrvlist["+i+"]/outrsrvupdtendyn") == ""){
  124. model.setValue("/root/main/norsrv/norsrvlist["+i+"]/outrsrvupdtendyn","N");
  125. }
  126. if(model.getValue("/root/main/norsrv/norsrvlist["+i+"]/outrsrvupdtendyn2") == ""){
  127. model.setValue("/root/main/norsrv/norsrvlist["+i+"]/outrsrvupdtendyn2","N");
  128. }
  129. if(model.getValue("/root/main/norsrv/norsrvlist["+i+"]/outrsrvupdtendyn3") == ""){
  130. model.setValue("/root/main/norsrv/norsrvlist["+i+"]/outrsrvupdtendyn3","N");
  131. }
  132. }
  133. }
  134. }
  135. //외래예역변경완료
  136. function fUpdateOutRsrvChg(){
  137. //체크된 데이터만 가져온다.
  138. var nodeList = instance1.selectNodes("/root/main/norsrv/norsrvlist[check='Y']");
  139. var rCSV = getNodeListCSV(nodeList);
  140. if( rCSV == "" || rCSV == null || rCSV == undefined){
  141. //messageBox("미예약 항목이 선택되지 않았습니다.", "E999", "");
  142. messageBox("변경할 미예약 내역이 선택되지", "E007");
  143. return false;
  144. }
  145. if(messageBox("변경된 예약내역을 반영하시겠습니까?", "Q999") != 6) return false;
  146. model.resetInstanceNode("/root/send/updatedata");
  147. //model.setValue("/root/send/updatedata/datalist", rCSV);
  148. setCSVToNode("/root/temp", rCSV);
  149. instance1.selectSingleNode("/root/temp").xml;
  150. model.copyNode("/root/send/updatedata", "/root/temp");
  151. if(submit("TXPMB02002")){
  152. //정상적으로 처리되었습니다.
  153. messageBox("정상적으로 ","I001");
  154. var rows = grd_rsrvchg.rows;
  155. var fixedRows = grd_rsrvchg.fixedRows;
  156. var dataRows = rows - fixedRows;
  157. for (var i = dataRows ; i>0; i--){
  158. if (model.getValue("/root/main/norsrv/norsrvlist["+i+"]/check") == "Y"){
  159. model.setValue("/root/main/norsrv/norsrvlist["+i+"]/check","N");
  160. }
  161. }
  162. model.removenode("/root/temp");
  163. model.makeNode("/root/temp");
  164. }
  165. model.refresh();
  166. }
  167. ]]>
  168. </script>
  169. </xhtml:head>
  170. <xhtml:body pagewidth="837" pageheight="460" guideline="1,699;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  171. <group id="group1" style="left:0px; top:0px; width:699px; height:13px; ">
  172. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:137px; height:14px; ">미예약변경</caption>
  173. </group>
  174. <group id="group3" scroll="auto" style="left:0px; top:13px; width:818px; height:442px; ">
  175. <group id="group2" style="left:0px; top:7px; width:818px; height:35px; vertical-align:top; ">
  176. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:818px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  177. <button id="btn_search" class="btn1_letter2" style="left:755px; top:7px; width:56px; height:22px; ">
  178. <caption>조회</caption>
  179. <script type="javascript" ev:event="DOMActivate">
  180. <![CDATA[
  181. fSearchOutNoRsrvList();
  182. ]]>
  183. </script>
  184. </button>
  185. <line id="line13" style="x1:739px; y1:7px; x2:739px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  186. </group>
  187. <caption id="caption1" class="tit_2" style="left:5px; top:54px; width:95px; height:14px; ">미예약 현황</caption>
  188. <line id="line1" class="line_1" style="x1:0px; y1:69px; x2:818px; y2:69px; "/>
  189. </group>
  190. <select1 id="cmb_orddrid" ref="/root/main/orddrid" class="combo_s_essential" appearance="minimal" style="left:394px; top:28px; width:141px; height:19px; ">
  191. <choices>
  192. <itemset nodeset="/root/init/orddrid/orddridlist">
  193. <label ref="nm"/>
  194. <value ref="cd"/>
  195. </itemset>
  196. </choices>
  197. </select1>
  198. <caption id="caption5" class="search_name" style="left:11px; top:29px; width:73px; height:17px; ">진료과 :</caption>
  199. <select1 id="cmb_orddeptcd" ref="/root/main/orddeptcd" class="combo_s_essential" appearance="minimal" style="left:85px; top:28px; width:180px; height:19px; ">
  200. <choices>
  201. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  202. <label ref="nm"/>
  203. <value ref="cd"/>
  204. </itemset>
  205. </choices>
  206. <script type="javascript" ev:event="xforms-value-changed">
  207. <![CDATA[
  208. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + cmb_orddeptcd.value + "']";
  209. model.setValue("/root/main/orddrid", "");
  210. cmb_orddrid.refresh();
  211. ]]>
  212. </script>
  213. </select1>
  214. <caption id="caption7" class="search_name" style="left:331px; top:29px; width:60px; height:17px; ">의사 :</caption>
  215. <button id="btn_saveSche7" class="btn4_letter2" style="left:763px; top:432px; width:56px; height:22px; ">
  216. <caption>닫기</caption>
  217. <script type="javascript" ev:event="DOMActivate">
  218. <![CDATA[
  219. model.close();
  220. ]]>
  221. </script>
  222. </button>
  223. <button id="btn_outrsrvchg" class="btn4_letter8" style="left:691px; top:58px; width:128px; height:22px; ">
  224. <caption>외래예약변경완료</caption>
  225. <script type="javascript" ev:event="DOMActivate">
  226. <![CDATA[
  227. fUpdateOutRsrvChg();
  228. ]]>
  229. </script>
  230. </button>
  231. <datagrid id="grd_rsrvchg" nodeset="/root/main/norsrv/norsrvlist" class="datagrid2" caption="^진료과^진료의사^휴진기간^휴진사유^결재상태^외래예약&#xA;변경유무(T/I)^외래예약&#xA;변경유무(과)^외래예약&#xA;변경유무(협)^seqno" colsep="^" colwidth="22, 99, 57, 138, 129, 108, 81, 79, 83, 100" dataheight="25" defaultrows="2" extendlastcol="false" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="10" rowsep="|" style="left:0px; top:87px; width:818px; height:338px; ">
  232. <col checkvalue="Y,N" ref="check" type="checkbox"/>
  233. <col disabled="true" ref="orddeptcd" type="combo" style="text-align:left; ">
  234. <choices>
  235. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  236. <label ref="nm"/>
  237. <value ref="cd"/>
  238. </itemset>
  239. </choices>
  240. </col>
  241. <col disabled="true" ref="orddrid" type="combo" style="text-align:center; ">
  242. <choices>
  243. <itemset nodeset="/root/init/orddrid/orddridlist">
  244. <label ref="nm"/>
  245. <value ref="cd"/>
  246. </itemset>
  247. </choices>
  248. </col>
  249. <col ref="fromtodd" style="text-align:center; "/>
  250. <col disabled="true" ref="ordendresn" type="combo" style="text-align:left; ">
  251. <choices>
  252. <itemset nodeset="/root/init/P0037list/P0037">
  253. <label ref="cdnm"/>
  254. <value ref="cdid"/>
  255. </itemset>
  256. </choices>
  257. </col>
  258. <col ref="acceptstatflag" type="combo" style="text-align:left; ">
  259. <choices>
  260. <itemset nodeset="/root/init/P0406list/P0406">
  261. <label ref="cdnm"/>
  262. <value ref="cdid"/>
  263. </itemset>
  264. </choices>
  265. </col>
  266. <col ref="outrsrvupdtendyn" type="combo" style="text-align:center; ">
  267. <choices>
  268. <itemset nodeset="/root/hidden/outrsrvupdtendyn/items">
  269. <label ref="label"/>
  270. <value ref="value"/>
  271. </itemset>
  272. </choices>
  273. </col>
  274. <col ref="outrsrvupdtendyn2" type="combo" style="text-align:center; ">
  275. <choices>
  276. <itemset nodeset="/root/hidden/outrsrvupdtendyn2/items">
  277. <label ref="label"/>
  278. <value ref="value"/>
  279. </itemset>
  280. </choices>
  281. </col>
  282. <col ref="outrsrvupdtendyn3" type="combo" style="text-align:center; ">
  283. <choices>
  284. <itemset nodeset="/root/hidden/outrsrvupdtendyn3/items">
  285. <label ref="label"/>
  286. <value ref="value"/>
  287. </itemset>
  288. </choices>
  289. </col>
  290. <col ref="seqno" visibility="hidden"/>
  291. <script type="javascript" ev:event="xforms-value-changed">
  292. <![CDATA[
  293. var check1 = model.getValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/outrsrvupdtendyn");
  294. var check2 = model.getValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/outrsrvupdtendyn2");
  295. var check3 = model.getValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/outrsrvupdtendyn3");
  296. if (grd_rsrvchg.col == 7 && check1 == "Y") {
  297. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/check","Y");
  298. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/outrsrvupdtendyn2","N");
  299. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/outrsrvupdtendyn3","N");
  300. }else if (grd_rsrvchg.col == 8 && check2 == "Y") {
  301. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/check","Y");
  302. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/outrsrvupdtendyn","N");
  303. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/outrsrvupdtendyn3","N");
  304. }else if (grd_rsrvchg.col == 9 && check3 == "Y") {
  305. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/check","Y");
  306. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/outrsrvupdtendyn","N");
  307. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/outrsrvupdtendyn2","N");
  308. }
  309. else {
  310. model.setValue("/root/main/norsrv/norsrvlist["+grd_rsrvchg.row+"]/check","N");
  311. }
  312. model.refresh();
  313. ]]>
  314. </script>
  315. </datagrid>
  316. <button id="button1" class="btn4_letter3" style="left:690px; top:432px; width:68px; height:22px; ">
  317. <caption>초기화</caption>
  318. <script type="javascript" ev:event="DOMActivate">
  319. <![CDATA[
  320. fInitialize();
  321. ]]>
  322. </script>
  323. </button>
  324. </xhtml:body>
  325. </xhtml:html>