SMPMB02500_의사휴진신청관리.xrw 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830
  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. <orddrid>A</orddrid>
  11. <orddeptcd/>
  12. <srchcond>H</srchcond>
  13. <fromdd/>
  14. <todd/>
  15. <drholiordsche>
  16. <drholiordschelist>
  17. </drholiordschelist>
  18. </drholiordsche>
  19. <result>
  20. <confirmdrholische/>
  21. </result>
  22. <histstatcd/>
  23. <endflag>D</endflag>
  24. <endflag/>
  25. <ordendresn/>
  26. <histyn/>
  27. <jobposcd/>
  28. <orddrnm/>
  29. </main>
  30. <send>
  31. <updatedata>
  32. <datalist/>
  33. </updatedata>
  34. <setdata>
  35. <orddeptcd/>
  36. <orddrid/>
  37. <ordendresn/>
  38. <fromdd/>
  39. <fromflag/>
  40. <todd/>
  41. <toflag/>
  42. <oupdtorddrnm/>
  43. <iupdtorddrnm/>
  44. <drappdd/>
  45. <remfact/>
  46. <workflag/>
  47. <prcsstat/>
  48. <fromtm/>
  49. <totm/>
  50. <doflag/>
  51. <region/>
  52. </setdata>
  53. <search>
  54. <orddrid/>
  55. <orddeptcd/>
  56. <srchcond/>
  57. <fromdd/>
  58. <todd/>
  59. <endflag/>
  60. <ordendresn/>
  61. <acceptstatflag/>
  62. <histstat/>
  63. <holiflag/>
  64. <endflag/>
  65. <histyn/>
  66. <jobposcd/>
  67. </search>
  68. <ioflag>A</ioflag>
  69. </send>
  70. <init>
  71. <P0037list>
  72. <P0037>
  73. <cdnm/>
  74. <cdid/>
  75. </P0037>
  76. </P0037list>
  77. <P0406list>
  78. <P0406>
  79. <cdid/>
  80. <cdnm/>
  81. </P0406>
  82. </P0406list>
  83. <orddeptcd>
  84. <orddeptcdlist>
  85. <cd/>
  86. <nm/>
  87. </orddeptcdlist>
  88. </orddeptcd>
  89. <orddrid>
  90. <orddridlist>
  91. <cd/>
  92. <nm/>
  93. <dp/>
  94. <sp/>
  95. </orddridlist>
  96. </orddrid>
  97. <P0316list>
  98. <P0316>
  99. <cdid>D</cdid>
  100. <cdnm>전일</cdnm>
  101. </P0316>
  102. </P0316list>
  103. <P0464list>
  104. <P464>
  105. <cdid/>
  106. <cdnm/>
  107. </P464>
  108. </P0464list>
  109. <R0064list>
  110. <R0064>
  111. <cdid/>
  112. <cdnm/>
  113. </R0064>
  114. </R0064list>
  115. </init>
  116. <hidden>
  117. <desc>
  118. <orddeptcd/>
  119. <orddrid/>
  120. <ordendresn/>
  121. <fromdd/>
  122. <fromflag/>
  123. <todd/>
  124. <toflagt/>
  125. <oupdtorddrnm/>
  126. <iupdtorddrnm/>
  127. <drappdd/>
  128. <remfact/>
  129. </desc>
  130. <P0037list>
  131. <P0037>
  132. <cdid/>
  133. <cdnm/>
  134. </P0037>
  135. </P0037list>
  136. </hidden>
  137. <temp>
  138. <flag/>
  139. <result/>
  140. <drholiordsche>
  141. <drholiordschelist/>
  142. </drholiordsche>
  143. </temp>
  144. <paminit>
  145. <PK046list>
  146. <PK046>
  147. <cdid/>
  148. <cdnm/>
  149. </PK046>
  150. </PK046list>
  151. </paminit>
  152. <excel>
  153. <ordinfo>
  154. <orddeptnm/>
  155. <orddrnm/>
  156. <gubun/>
  157. <reason/>
  158. <fromdd/>
  159. <fromtm/>
  160. <todd/>
  161. <totm/>
  162. <etc/>
  163. </ordinfo>
  164. </excel>
  165. </root>
  166. </instance>
  167. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  168. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  169. <submission id="TRPMB00901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/drholiordsche"/>
  170. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/tmp"/>
  171. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  172. <script type="javascript" ev:event="xforms-ready">
  173. <![CDATA[
  174. zbcfGetCodeList(new Array("P0037","P0406","P0316", "P0464", "R0064"), new Array("/root/init/P0037list","/root/init/P0406list", "/root/init/P0316list", "/root/init/P0464list", "/root/init/R0064list"), false);
  175. // 마감승인관련 사용자부서 제어 추가 by 조중래 20131105
  176. pamfGetCodeList(new Array("PK046"), new Array("/root/paminit/PK046list"));
  177. pamGetDeptCDDrIDList();
  178. model.makeNode("/root/init/temp/orddeptcd/orddeptcdlist/cd");
  179. model.makeNode("/root/init/temp/orddeptcd/orddeptcdlist/nm");
  180. copyNodesetType("/root/init/orddeptcd/orddeptcdlist", "/root/init/temp/orddeptcd/orddeptcdlist", "before");
  181. // 휴가 제외처리 추가 by 조중래 20130716
  182. // 그리드 설정부에 있음 : nodeset="/root/init/P0037list/P0037[detldesc = 'H' and cdnm != '휴가']"
  183. //접수예약 그리드에 전체선택 체크박스 추가
  184. //grd_holische.fixedcellcheckbox(1,1) = true;
  185. model.refresh();
  186. // addComboItem("cmb_orddeptcd","구강악안면방사선과","2242000000","init");
  187. // addComboItem("cmb_orddrid","전체","","above");
  188. fInitialize();
  189. //model.setValue("/root/main/histstatcd","YC");
  190. // combo3.nodeset = "/root/init/P0037list[cddetl = " + 'H' + "]";
  191. // combo3.rebuild();
  192. ]]>
  193. </script>
  194. <submission id="TXPMB02501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/setdata" resultref="/root/temp/result"/>
  195. <submission id="TXPMB00902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata"/>
  196. <submission id="TXPMB00903" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata"/>
  197. <submission id="TRPMB00902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/drholiordsche"/>
  198. <submission id="TRPMB00903" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/setdata" resultref="/root/temp/drholiordsche"/>
  199. <submission id="TXPMB02502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/setdata" resultref="/root/temp/result"/>
  200. <submission id="TXPMB00904" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata/datalist" resultref="/root/main/result"/>
  201. <submission id="TXPMB00905" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
  202. </model>
  203. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  204. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  205. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  206. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  207. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  208. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  209. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  210. <script type="javascript">
  211. <![CDATA[
  212. function fInitialize(){
  213. model.resetInstanceNode("/root/send");
  214. model.resetInstanceNode("/root/main");
  215. model.removeNodeset("/root/main/drholiordsche/drholiordschelist");
  216. //조회조건 세팅
  217. model.setValue("/root/main/srchcond", "H"); //조회조건 (H:휴진, A:승인)
  218. //end..
  219. //마감구분 세팅
  220. model.setValue("/root/main/endflag", "N"); //조회구분 (N:신청, Y:승인)
  221. //end..
  222. //휴진기간 구분 조건 세팅
  223. model.setValue("/root/send/setdata/fromflag", 'D'); //휴진기간 구분 전일로 세팅
  224. model.setValue("/root/send/setdata/toflag", 'D');
  225. model.setValue("/root/send/setdata/fromtm", '0830'); //휴진기간 구분 전일로 세팅
  226. model.setValue("/root/send/setdata/totm", '2359');
  227. //end..
  228. var curDate = getCurrentDate();
  229. model.setValue("/root/main/fromdd", curDate);
  230. model.setValue("/root/main/todd", curDate);
  231. model.setValue("/root/send/setdata/fromdd",curDate);
  232. model.setValue("/root/send/setdata/todd",curDate);
  233. model.setValue("/root/send/setdata/drappdd",curDate);
  234. /*
  235. //현재일자 + 1달
  236. curDate = curDate.toDate().getAddDate(1,"M");
  237. var nextDate = curDate.getFullYear();
  238. nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  239. nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  240. model.setValue("/root/main/todd", nextDate);
  241. */
  242. model.makeValue("/root/send/setdata/workflag","I");
  243. /*
  244. caption2.visible = false;
  245. ipt_fromdd.visible = false;
  246. caption10.visible = false;
  247. ipt_todd.visible = false;
  248. */
  249. //마감버튼처리
  250. button2.disabled = false;
  251. button4.disabled = true;
  252. model.refresh();
  253. }
  254. function fclear(){
  255. model.resetInstanceNode("/root/send/search");
  256. model.resetInstanceNode("/root/main");
  257. //조회조건 세팅
  258. model.setValue("/root/main/srchcond", "D"); //조회조건 (D:휴진, A:승인)
  259. //end..
  260. //마감구분 세팅
  261. model.setValue("/root/main/endflag", "N"); //조회구분 (N:신청, Y:승인)
  262. //end..
  263. //휴진기간 구분 조건 세팅
  264. model.setValue("/root/send/setdata/fromflag", 'D'); //휴진기간 구분 전일로 세팅
  265. model.setValue("/root/send/setdata/toflag", 'D');
  266. var curDate = getCurrentDate();
  267. model.setValue("/root/main/fromdd", curDate);
  268. model.setValue("/root/send/setdata/fromdd",curDate);
  269. model.setValue("/root/send/setdata/todd",curDate);
  270. model.setValue("/root/send/setdata/drappdd",curDate);
  271. //현재일자 + 1달
  272. curDate = curDate.toDate().getAddDate(1,"M");
  273. var nextDate = curDate.getFullYear();
  274. nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  275. nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  276. model.setValue("/root/main/todd", nextDate);
  277. model.makeValue("/root/send/setdata/workflag","I");
  278. model.refresh();
  279. }
  280. /*
  281. function fDataCheck( flag ){
  282. var ordendcnfmyn = "";
  283. for( var i = grd_holische.fixedRows; i < grd_holische.rows; i++){
  284. //model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + (i - 1) + "]/check")
  285. if( grd_holische.valueMatrix( i, grd_holische.colRef("endcnfmyn") ) == 'Y' ){
  286. if( flag == 'ok' ){
  287. if( 'Y' == model.getValue("/root/main/drholiordsche/drholiordschelist[" + i + "]/endcnfmyn")){
  288. messageBox("이미 마감확인 하신 휴진일정을 다시 마감확인 하실 수 없습니다.( " + i + " 번째 줄 확인! )", "E999", "");
  289. return false;
  290. }
  291. }else{
  292. if( 'Y' != model.getValue("/root/main/drholiordsche/drholiordschelist[" + i + "]/endcnfmyn")){
  293. messageBox("마감확인 하지 않은 휴진일정을 마감취소 하실 수 없습니다.( " + i + " 번째 줄 확인! )", "E999", "");
  294. return false;
  295. }
  296. }
  297. }
  298. }
  299. return true;
  300. }
  301. */
  302. //의사휴진일정 조회
  303. function fSearchDrHoliSche(strFlag){
  304. // 치과소속 사용자의 경우, 치과만 처리 가능하도록 제어 추가 by 조중래 20170609
  305. var dutPlceInstCd = getUserInfo("dutplceinstcd");
  306. var orddeptcd = model.getValue("/root/main/orddeptcd");
  307. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[cd='" + orddeptcd + "']/reqdeptno").substr(0, 2);
  308. var dutPlceCd = getUserInfo("dutplcecd");
  309. if (dutPlceInstCd != "033" && dutPlceCd == "2240000000" && isNull(orddeptcd)) {
  310. messageBox("진료과를 선택 후 조회하시기 바랍니다.", "C000");
  311. return false;
  312. }
  313. if (dutPlceInstCd != "033" && reqdeptno != "55" && dutPlceCd == "2240000000") {
  314. messageBox("치과소속의 의사만 조회/신청 가능합니다.", "C000");
  315. return false;
  316. }
  317. // model.resetInstanceNode("/root/send");
  318. // var checkflag = model.getValue("/root/main/endflag");
  319. var from = model.getValue("/root/main/fromdd");
  320. var to = model.getValue("/root/main/todd");
  321. if(from > to)
  322. {
  323. messageBox("조회기간이 잘못 입력 되었습니다.", "E999");
  324. return;
  325. }
  326. model.setValue("/root/send/search/orddrid", model.getValue("/root/main/orddrid"));
  327. model.setValue("/root/send/search/orddeptcd", model.getValue("/root/main/orddeptcd"));
  328. model.setValue("/root/send/search/srchcond", model.getValue("/root/main/srchcond"));
  329. model.setValue("/root/send/search/endflag", model.getValue("/root/main/endflag"));
  330. model.setValue("/root/send/search/fromdd", model.getValue("/root/main/fromdd"));
  331. model.setValue("/root/send/search/todd", model.getValue("/root/main/todd"));
  332. model.setValue("/root/send/search/histyn", model.getValue("/root/main/histyn"));
  333. model.setValue("/root/send/search/jobposcd", model.getValue("/root/main/jobposcd"));
  334. // if(checkflag == 'A') {
  335. //2008-06-19 이동식 추가
  336. model.setValue("/root/send/search/holiflag", 'H');
  337. if( model.getValue("/root/send/search/srchcond") !='' && model.getValue("/root/send/search/fromdd") != "" && model.getValue("/root/send/search/todd") != "" ){
  338. submit("TRPMB00901");
  339. var cnt = getNodesetCount("/root/main/drholiordsche/drholiordschelist");
  340. var instcd = getUserInfo("dutplceinstcd");
  341. // 배경색 초기화
  342. grd_holische.rebuildStyle();
  343. // 배경색 제어 : 타병원(주황색) 및 이력(회색)
  344. for (var i = 1; i <= cnt; i++) {
  345. // 타병원에서 전자결재 연동된 경우
  346. if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/minstcd").substr(0, 3) != ""
  347. && model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/minstcd").substr(0, 3) != instcd) {
  348. grd_holische.rowStyle(i + 1,"data","background-color") = "#FFCCFF";
  349. // 이력처리
  350. } else if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/histstat") == "C") {
  351. grd_holische.rowStyle(i + 1,"data","background-color") = "#C0C0C0";
  352. }
  353. }
  354. }
  355. // }else{
  356. // messageBox("조회기간 정보를 입려하지", "E007");
  357. // }
  358. // }
  359. // else if(checkflag == 'B') {
  360. //
  361. // //2008-06-19 이동식 추가
  362. // model.setValue("/root/send/search/holiflag", 'T');
  363. // if( model.getValue("/root/send/search/srchcond") !='' && model.getValue("/root/send/search/fromdd") != "" && model.getValue("/root/send/search/todd") != "" ){
  364. // submit("TRPMB00902");
  365. // }else{
  366. // messageBox("조회기간 정보를 입려하지", "E007");
  367. // }
  368. // }
  369. model.refresh();
  370. }
  371. //필수 입력값 확인
  372. function fcheck(){
  373. if(model.getValue("/root/send/setdata/orddeptcd") == "") {
  374. messageBox("진료과가 입력되지", "E007");
  375. return false;
  376. }
  377. if(model.getValue("/root/send/setdata/orddrid") == "") {
  378. messageBox("진료의사가 입력되지", "E007");
  379. return false;
  380. }
  381. if(model.getValue("/root/send/setdata/doflag") == "") {
  382. messageBox("국내외구분이 입력되지", "E007");
  383. return false;
  384. }
  385. if(model.getValue("/root/send/setdata/ordendresn") == "") {
  386. messageBox("휴진사유가 입력되지", "E007");
  387. return false;
  388. }
  389. if(model.getValue("/root/send/setdata/fromdd") == "") {
  390. messageBox("휴직기간의 시작일이 입력되지", "E007");
  391. return false;
  392. }
  393. if(model.getValue("/root/send/setdata/fromflag") == "") {
  394. messageBox("휴직기간의 시작일 구분(전일, 오전, 오후)이 입력되지", "E007");
  395. return false;
  396. }
  397. if(model.getValue("/root/send/setdata/fromtm") == "") {
  398. messageBox("휴직기간의 시작일 시간이 입력되지", "E007");
  399. return false;
  400. }
  401. if(model.getValue("/root/send/setdata/todd") == "") {
  402. messageBox("휴직기간의 종료일이 입력되지", "E007");
  403. return false;
  404. }
  405. if(model.getValue("/root/send/setdata/toflag") == "") {
  406. messageBox("휴직기간의 종료일 구분(전일, 오전, 오후)이 입력되지", "E007");
  407. return false;
  408. }
  409. if(model.getValue("/root/send/setdata/totm") == "") {
  410. messageBox("휴직기간의 종료일 시간이 입력되지", "E007");
  411. return false;
  412. }
  413. if(model.getValue("/root/send/setdata/drappdd") == "") {
  414. messageBox("의사 신청일이 입력되지", "E007");
  415. return false;
  416. }
  417. }
  418. function fCheckModify() {
  419. //입력창에 매핑된 send Node 와 변경 전 데이타인 hidden Node 를 비교한다.
  420. //변경되었으면, return true
  421. if ( (model.getValue("/root/hidden/desc/orddeptcd") ) != ( model.getValue("/root/send/setdata/orddeptcd")) ) return true; //진료과
  422. if ( (model.getValue("/root/hidden/desc/orddrid") ) != ( model.getValue("/root/send/setdata/orddrid")) ) return true; //진료의사
  423. if ( (model.getValue("/root/hidden/desc/ordendresn") ) != ( model.getValue("/root/send/setdata/ordendresn")) ) return true; //휴진사유
  424. if ( (model.getValue("/root/hidden/desc/fromdd") ) != ( model.getValue("/root/send/setdata/fromdd")) ) return true; //휴진시작일자
  425. if ( (model.getValue("/root/hidden/desc/fromflag") ) != ( model.getValue("/root/send/setdata/fromflag")) ) return true; //휴진시작구분
  426. if ( (model.getValue("/root/hidden/desc/todd") ) != ( model.getValue("/root/send/setdata/todd")) ) return true; //휴진종료일자
  427. if ( (model.getValue("/root/hidden/desc/toflag") ) != ( model.getValue("/root/send/setdata/toflag")) ) return true; //휴진종료구분
  428. if ( (model.getValue("/root/hidden/desc/oupdtorddrnm") ) != ( model.getValue("/root/send/setdata/oupdtorddrnm")) ) return true; //외래대진진료의사
  429. if ( (model.getValue("/root/hidden/desc/iupdtorddrnm") ) != ( model.getValue("/root/send/setdata/iupdtorddrnm")) ) return true; //입원대진진료의사
  430. if ( (model.getValue("/root/hidden/desc/drappdd") ) != ( model.getValue("/root/send/setdata/drappdd")) ) return true; //의사신청일
  431. if ( (model.getValue("/root/hidden/desc/remfact") ) != ( model.getValue("/root/send/updatedata/remfact")) ) return true; //비고
  432. return false;
  433. }
  434. function daydatecheck() {
  435. var from = model.getValue("/root/send/setdata/fromdd") + model.getValue("/root/send/setdata/fromtm");
  436. var to = model.getValue("/root/send/setdata/todd") + model.getValue("/root/send/setdata/totm");
  437. if (model.getValue("/root/send/setdata/fromdd") < getCurrentDate()) {
  438. messageBox("과거일자로의 휴진신청은 불가능합니다.", "E000");
  439. return false;
  440. }
  441. if( ! isValidDateTime(from, "YYYYMMDDhhmm") || ! isValidDateTime(to, "YYYYMMDDhhmm") ){
  442. messageBox("휴진기간이 날자형식이 아닙니다. 확인 후 다시 입력해주세요.", "E999", "");
  443. return false;
  444. }
  445. if(from > to)
  446. {
  447. messageBox("조회기간이 잘못 입력 되었습니다.", "E999");
  448. return false;
  449. }
  450. }
  451. function fIsValidDept() {
  452. // 사용자 근무부서 취득
  453. var dutPlceCd = getUserInfo("dutplcecd");
  454. // 원무공통코드에 등록되어있는 부서인지 조회
  455. var cnt = getNodesetCount("/root/paminit/PK046list/PK046[cdid='" + dutPlceCd + "']");
  456. // 존재하지 않으면 false를 리턴
  457. if (cnt < 1) {
  458. return false;
  459. }
  460. return true;
  461. }
  462. // EXCEL 데이터를 업로드 처리
  463. function fLoadExcel(){
  464. var fileName = window.fileDialog("open", ",", false, "", "xlsx", "Excel Files(*.xlsx)|*.xlsx|All Files (*.*)|*.*");
  465. if (fileName != ""){
  466. grd_excel.loadExcel(fileName);
  467. grd_excel.refresh();
  468. fLoadExcelData(grd_excel.rows);
  469. } else {
  470. alert("파일 선택이 되지않았습니다");
  471. }
  472. }
  473. function fLoadExcelData(rows){
  474. if (rows < 1) {
  475. alert("업로드할 데이터가 없습니다.");
  476. return;
  477. }
  478. for(var i=1; i < rows; i++){
  479. var orddeptcd = model.getValue("/root/init/orddeptcd/orddeptcdlist[nm='"+grd_excel.valueMatrix(i, grd_excel.colRef("orddeptnm"))+"']/cd");
  480. var orddrid = model.getValue("/root/init/orddrid/orddridlist[dp='"+ orddeptcd +"' and nmsp='"+ grd_excel.valueMatrix(i, grd_excel.colRef("orddrnm"))+"']/cd");
  481. // 진료과명 오류
  482. if(isNull(orddeptcd)){
  483. alert("진료과명을 확인해주십시오. \r\n" + grd_excel.valueMatrix(i, grd_excel.colRef("orddeptnm")));
  484. return;
  485. }
  486. // 진료의명 오류
  487. if (isNull(orddrid)) {
  488. alert("진료의 사번을 찾을 수 없습니다. \r\n" + "[" + grd_excel.valueMatrix(i, grd_excel.colRef("orddeptnm")) + "] " + grd_excel.valueMatrix(i, grd_excel.colRef("orddrnm")));
  489. return;
  490. }
  491. model.makeValue("/root/send/setdata/orddeptcd", orddeptcd);
  492. model.makeValue("/root/send/setdata/orddrid", orddrid);
  493. // 국내외 구분 오류
  494. if(grd_excel.valueMatrix(i, grd_excel.colRef("gubun"))=="국내"){
  495. model.makeValue("/root/send/setdata/doflag", "D");
  496. combo7.dispatch("xforms-value-changed");
  497. }else if(grd_excel.valueMatrix(i, grd_excel.colRef("gubun"))=="국외"){
  498. model.makeValue("/root/send/setdata/doflag", "O");
  499. combo7.dispatch("xforms-value-changed");
  500. }else{
  501. alert("국내외 구분이 올바르지 않습니다.\r\n"+ "[" + grd_excel.valueMatrix(i, grd_excel.colRef("orddeptnm")) + "] " + grd_excel.valueMatrix(i, grd_excel.colRef("orddrnm")));
  502. return;
  503. }
  504. model.makeValue("/root/send/setdata/ordendresn", model.getValue("/root/hidden/P0037list/P0037[cdnm='"+grd_excel.valueMatrix(i, grd_excel.colRef("reason"))+"']/cdid"));
  505. model.makeValue("/root/send/setdata/drappdd", input6.value);
  506. model.makeValue("/root/send/setdata/fromdd", grd_excel.valueMatrix(i, grd_excel.colRef("fromdd")));
  507. model.makeValue("/root/send/setdata/fromtm", grd_excel.valueMatrix(i, grd_excel.colRef("fromtm")));
  508. model.makeValue("/root/send/setdata/todd", grd_excel.valueMatrix(i, grd_excel.colRef("todd")));
  509. model.makeValue("/root/send/setdata/totm", grd_excel.valueMatrix(i, grd_excel.colRef("totm")));
  510. model.makeValue("/root/send/setdata/remfact", grd_excel.valueMatrix(i, grd_excel.colRef("etc")));
  511. model.makeValue("/root/send/setdata/workflag","I");
  512. model.setValue("/root/send/setdata/prcsstat", '01');
  513. if(!submit("TXPMB02501")){
  514. messageBox("저장시 에러가 발생하였습니다.", "E");
  515. model.resetInstanceNode("/root/excel/ordinfo");
  516. break;
  517. };
  518. }
  519. }
  520. ]]>
  521. </script>
  522. </xhtml:head>
  523. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1196;2,143;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  524. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  525. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:254px; height:14px; ">휴진일정 등록</caption>
  526. </group>
  527. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  528. <!-- group id="group4" style="left:0px; top:9px; width:1194px; height:35px; vertical-align:top; " -->
  529. <group id="group4" style="left:0px; top:9px; width:1194px; height:36px; vertical-align:top; ">
  530. <caption id="caption1" class="search_name" style="left:1020px; top:10px; width:86px; height:17px; ">진행상황 :</caption>
  531. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  532. <button id="btn_search" class="btn1_letter2" style="left:1128px; top:7px; width:56px; height:22px; ">
  533. <caption>조회</caption>
  534. <script type="javascript" ev:event="DOMActivate">
  535. <![CDATA[
  536. fSearchDrHoliSche("Y");
  537. //model.refresh();
  538. ]]>
  539. </script>
  540. </button>
  541. <caption id="caption10" style="left:954px; top:9px; width:10px; height:19px; font-weight:bold; text-align:center; vertical-align:middle; ">~</caption>
  542. <select1 id="cmb_orddrid" ref="/root/main/orddrid" class="combo_s_essential" appearance="minimal" style="left:339px; top:9px; width:78px; height:19px; ">
  543. <choices>
  544. <itemset nodeset="/root/init/orddrid/orddridlist">
  545. <label ref="nm"/>
  546. <value ref="cd"/>
  547. </itemset>
  548. </choices>
  549. </select1>
  550. <caption id="caption5" class="search_name" style="left:5px; top:9px; width:73px; height:17px; ">진료과 :</caption>
  551. <caption id="caption7" class="search_name" style="left:220px; top:9px; width:74px; height:17px; ">진료의 :</caption>
  552. <select1 id="cmb_orddeptcd" ref="/root/main/orddeptcd" class="combo_s_essential" navindex="2" appearance="minimal" style="left:77px; top:9px; width:130px; height:19px; ">
  553. <choices>
  554. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  555. <label ref="nm"/>
  556. <value ref="cd"/>
  557. </itemset>
  558. </choices>
  559. <script type="javascript" ev:event="xforms-value-changed">
  560. <![CDATA[
  561. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + cmb_orddeptcd.value + "']";
  562. model.setValue("/root/main/orddrid", "");
  563. cmb_orddrid.refresh();
  564. ]]>
  565. </script>
  566. </select1>
  567. <caption id="caption2" class="search_name" style="left:736px; top:9px; width:86px; height:17px; ">조회기간 :</caption>
  568. <input id="ipt_fromdd" ref="/root/main/fromdd" class="input_search" inputtype="date" style="left:881px; top:9px; width:85px; height:19px; "/>
  569. <input id="ipt_todd" ref="/root/main/todd" class="input_search" inputtype="date" style="left:979px; top:9px; width:85px; height:19px; "/>
  570. <caption id="caption3" class="search_name" style="left:590px; top:9px; width:86px; height:17px; ">조회구분 :</caption>
  571. <select1 id="combo6" ref="/root/main/endflag" appearance="minimal" style="left:678px; top:9px; width:52px; height:19px; ">
  572. <choices>
  573. <item>
  574. <label>신청</label>
  575. <value>N</value>
  576. </item>
  577. <item>
  578. <label>마감</label>
  579. <value>Y</value>
  580. </item>
  581. </choices>
  582. <script type="javascript" ev:event="xforms-select">
  583. <![CDATA[
  584. if(model.getvalue("/root/main/endflag") == "N"){
  585. // model.removeNodeset("/root/main/drholiordsche/drholiordschelist");
  586. /*
  587. caption2.visible = false;
  588. ipt_fromdd.visible = false;
  589. caption10.visible = false;
  590. ipt_todd.visible = false;
  591. // */
  592. button2.disabled = false;
  593. button4.disabled = true;
  594. model.refresh();
  595. }
  596. if(model.getvalue("/root/main/endflag") == "Y"){
  597. // model.removeNodeset("/root/main/drholiordsche/drholiordschelist");
  598. /*
  599. caption2.visible = true;
  600. ipt_fromdd.visible = true;
  601. caption10.visible = true;
  602. ipt_todd.visible = true;
  603. */
  604. button2.disabled = true;
  605. button4.disabled = false;
  606. model.refresh();
  607. }
  608. // if (model.getValue("/root/send/data3") != "") {
  609. ]]>
  610. </script>
  611. </select1>
  612. <select id="checkbox1" ref="/root/main/histyn" overflow="visible" appearance="full" style="left:1072px; top:10px; width:43px; height:15px; border-style:none; ">
  613. <choices>
  614. <item>
  615. <label>이력</label>
  616. <value>Y</value>
  617. </item>
  618. </choices>
  619. </select>
  620. <select1 id="combo8" ref="/root/main/jobposcd" class="combo_s_essential" appearance="minimal" style="left:514px; top:9px; width:70px; height:19px; ">
  621. <choices>
  622. <item>
  623. <label>전체</label>
  624. <value/>
  625. </item>
  626. <item>
  627. <label>전문의</label>
  628. <value>1782</value>
  629. </item>
  630. <item>
  631. <label>전공의</label>
  632. <value>1800</value>
  633. </item>
  634. <item>
  635. <label>연수의</label>
  636. <value>1799</value>
  637. </item>
  638. </choices>
  639. </select1>
  640. <input id="input10" style="left:294px; top:9px; width:45px; height:19px; ">
  641. <script type="javascript" ev:event="onkeypress">
  642. <![CDATA[
  643. if (event.keyCode == "13") {
  644. var orddrnm = input10.currentText;
  645. var orddrid = model.getValue("/root/init/orddrid/orddridlist[nm='" + orddrnm + "']/cd");
  646. var orddrnm2 = input10.currentText + "[Y]"; // 선택진료의사용
  647. var orddrid2 = model.getValue("/root/init/orddrid/orddridlist[nm='" + orddrnm2 + "']/cd");
  648. if (isNull(orddrid) && isNull(orddrid2)) {
  649. alert("해당의사가 존재하지 않습니다.");
  650. return;
  651. } else {
  652. if (!isNull(orddrid)) {
  653. model.setValue("/root/main/orddrid", orddrid);
  654. } else {
  655. model.setValue("/root/main/orddrid", orddrid2);
  656. }
  657. model.refresh();
  658. }
  659. }
  660. ]]>
  661. </script>
  662. <hint>
  663. <![CDATA[진료의 성명으로 조회가능합니다.]]>
  664. </hint>
  665. </input>
  666. <caption id="caption21" class="search_name" style="left:425px; top:10px; width:86px; height:17px; ">의사구분 :</caption>
  667. <select1 id="combo9" ref="/root/main/srchcond" appearance="minimal" style="left:825px; top:9px; width:52px; height:19px; ">
  668. <choices>
  669. <item>
  670. <label>휴진</label>
  671. <value>H</value>
  672. </item>
  673. <item>
  674. <label>신청</label>
  675. <value>A</value>
  676. </item>
  677. </choices>
  678. </select1>
  679. <caption id="caption22" style="left:965px; top:10px; width:15px; height:20px; text-align:center; ">~</caption>
  680. </group>
  681. <col type="checkbox"/>
  682. <caption id="caption4" class="tit_2" style="left:6px; top:59px; width:131px; height:13px; ">
  683. <![CDATA[의사휴진일정내역]]>
  684. <script type="javascript" ev:event="ondblclick">
  685. <![CDATA[
  686. //modal("SMPMB02510", "1","50", "50", "SMPMB02510", "", "");
  687. ]]>
  688. </script>
  689. </caption>
  690. <line id="line3" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
  691. <datagrid id="grd_holische" nodeset="/root/main/drholiordsche/drholiordschelist" class="datagrid2" visibility="visible" caption="선택^마감승인여부^진행상황^이력&#xA;상태^진료과^진료의사^구분^구분^국내&#xA;국외^출장&#xA;지역^휴진사유^전자결재&#xA;진행상태^휴진기간^휴진기간^휴진기간^휴진기간^의사신청일^비고^최종수정자^seqno^histstat^진료과코드^진료의ID^휴진구분^시작구분^종료구분^최초등록정보^최초등록정보^최초등록정보^최종수정정보^최종수정정보^최종수정정보^휴진&#xA; UNIT수^외래대진&#xA;진료의사^입원대진&#xA;진료의사^GW연동키out^문서번호(원)^문서번호(타)^GW연동키in^GW연동키2in^마감확인시간|선택^마감승인여부^진행상황^이력&#xA;상태^진료과^진료의사^구분^구분^국내&#xA;국외^출장&#xA;지역^휴진사유^전자결재&#xA;진행상태^시작일^시간^종료일^시간^의사신청일^비고^최종수정자^seqno^histstat^진료과코드^진료의ID^휴진구분^시작구분^종료구분^일시^성명^사번^일시^성명^사번^휴진&#xA; UNIT수^외래대진&#xA;진료의사^입원대진&#xA;진료의사^GW연동키out^문서번호(원)^문서번호(타)^GW연동키in^GW연동키2in^마감확인시간" colsep="^" colwidth="35, 35, 72, 33, 130, 70, 52, 70, 42, 60, 64, 103, 100, 50, 100, 50, 91, 299, 100, 100, 100, 100, 100, 100, 100, 100, 140, 60, 60, 140, 60, 60, 60, 70, 70, 100, 100, 100, 83, 100, 100" dataheight="25" defaultrows="2" extendlastcol="false" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:165px; width:1194px; height:568px; font-weight:bold; ">
  692. <col checkvalue="Y,C" ref="check" type="checkbox"/>
  693. <col checkvalue="Y,C" disabled="true" ref="endcnfmyn" type="checkbox"/>
  694. <col disabled="true" ref="prcsstat" type="combo" visibility="hidden" style="text-align:center; ">
  695. <choices>
  696. <itemset nodeset="/root/init/P0464list/P0464">
  697. <label ref="cdnm"/>
  698. <value ref="cdid"/>
  699. </itemset>
  700. </choices>
  701. </col>
  702. <col ref="histstat" style="text-align:center; "/>
  703. <col disabled="true" ref="orddeptnm" style="word-wrap:hard; "/>
  704. <col disabled="true" ref="orddrnm" style="text-align:center; "/>
  705. <col disabled="true" ref="jobposcd" type="combo" style="text-align:center; ">
  706. <choices>
  707. <item>
  708. <label>전문의</label>
  709. <value>1782</value>
  710. </item>
  711. <item>
  712. <label>전공의</label>
  713. <value>1800</value>
  714. </item>
  715. <item>
  716. <label>연수의</label>
  717. <value>1799</value>
  718. </item>
  719. </choices>
  720. </col>
  721. <col disabled="true" ref="jobgradcd" type="combo" style="text-align:center; ">
  722. <choices>
  723. <itemset nodeset="/root/init/R0064list/R0064">
  724. <label ref="cdnm"/>
  725. <value ref="cdid"/>
  726. </itemset>
  727. </choices>
  728. </col>
  729. <col disabled="true" ref="doflag" type="combo" style="text-align:center; ">
  730. <choices>
  731. <item>
  732. <label>국내</label>
  733. <value>D</value>
  734. </item>
  735. <item>
  736. <label>국외</label>
  737. <value>O</value>
  738. </item>
  739. </choices>
  740. </col>
  741. <col disabled="true" ref="region" type="output" style="text-align:center; "/>
  742. <col disabled="true" ref="ordendresnnm" type="output" style="text-align:center; "/>
  743. <col disabled="true" ref="gwstatus" type="inputbutton" style="text-align:center; "/>
  744. <col disabled="true" ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  745. <col disabled="true" ref="fromtm" format="hh:nn" style="text-align:center; "/>
  746. <col disabled="true" ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  747. <col disabled="true" ref="totm" format="hh:nn" style="text-align:center; "/>
  748. <col disabled="true" ref="drappdd" format="yyyy-mm-dd" style="text-align:center; "/>
  749. <col disabled="true" ref="remfact"/>
  750. <col ref="lastupdtrid" visibility="hidden"/>
  751. <col ref="seqno" visibility="hidden"/>
  752. <col ref="histstat" visibility="hidden"/>
  753. <col disabled="true" ref="orddeptcd" type="combo" visibility="hidden" style="word-wrap:hard; ">
  754. <choices>
  755. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  756. <label ref="nm"/>
  757. <value ref="cd"/>
  758. </itemset>
  759. </choices>
  760. </col>
  761. <col disabled="true" ref="orddrid" type="combo" visibility="hidden" style="text-align:center; ">
  762. <choices>
  763. <itemset nodeset="/root/init/orddrid/orddridlist">
  764. <label ref="nm"/>
  765. <value ref="cd"/>
  766. </itemset>
  767. </choices>
  768. </col>
  769. <col ref="holiflag" visibility="hidden"/>
  770. <col disabled="true" ref="fromflag" type="combo" visibility="hidden">
  771. <choices>
  772. <itemset nodeset="/root/init/P0316list/P0316">
  773. <label ref="cdnm"/>
  774. <value ref="cdid"/>
  775. </itemset>
  776. </choices>
  777. </col>
  778. <col disabled="true" ref="toflag" type="combo" visibility="hidden">
  779. <choices>
  780. <itemset nodeset="/root/init/P0316list/P0316">
  781. <label ref="cdnm"/>
  782. <value ref="cdid"/>
  783. </itemset>
  784. </choices>
  785. </col>
  786. <col ref="fstrgstdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  787. <col ref="fstrgstrnm" style="text-align:center; "/>
  788. <col ref="fstrgstrid" visibility="hidden" style="text-align:center; "/>
  789. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  790. <col ref="lastupdtrnm" style="text-align:center; "/>
  791. <col ref="lastupdtrid" visibility="hidden" style="text-align:center; "/>
  792. <col ref="layoffunitcnt" style="text-align:right; "/>
  793. <col disabled="true" ref="oupdtorddrnm" style="left:777px; top:52px; width:125px; height:23px; text-align:center; "/>
  794. <col disabled="true" ref="iupdtorddrnm" style="left:777px; top:52px; width:125px; height:23px; text-align:center; "/>
  795. <col ref="apprid" visibility="hidden"/>
  796. <col ref="docregno"/>
  797. <col ref="docregno2"/>
  798. <col ref="pinstcd"/>
  799. <col ref="minstcd"/>
  800. <col ref="endcnfmdt" visibility="hidden"/>
  801. <script type="javascript" ev:event="onclick">
  802. <![CDATA[
  803. var cur_row = grd_holische.row;
  804. cur_row = cur_row-1;
  805. var confirm = model.getValue("/root/main/endflag");
  806. if(cur_row > 0) {
  807. if((model.getValue("/root/main/drholiordsche/drholiordschelist["+cur_row+"]/prcsstat") == "01")
  808. || (model.getValue("/root/main/drholiordsche/drholiordschelist["+cur_row+"]/prcsstat") == "05")){
  809. model.resetInstanceNode("/root/send/setdata");
  810. //model.refresh();
  811. model.copyNode("/root/send/setdata","/root/main/drholiordsche/drholiordschelist["+cur_row+"]");
  812. model.copyNode("/root/hidden/desc","/root/main/drholiordsche/drholiordschelist["+cur_row+"]");
  813. model.refresh();
  814. }
  815. // 전자결재 연동
  816. if(grd_holische.col == grd_holische.colRef("gwstatus")
  817. && model.getValue("/root/main/drholiordsche/drholiordschelist["+cur_row+"]/gwstatus") != "") {
  818. // MIS.js 함수 호출(mis_miscommonweb)
  819. misfViewElctSanct(model.getValue("/root/main/drholiordsche/drholiordschelist["+cur_row+"]/apprid"));
  820. }
  821. }
  822. model.refresh();
  823. var check = model.getValue("/root/main/drholiordsche/drholiordschelist[" + cur_row+ "]/check");
  824. if (check == "Y") {
  825. grd_holische.rowstatus(grd_holische.row) = 1;
  826. } else if (check == "C") {
  827. grd_holische.rowstatus(grd_holische.row) = 4;
  828. }
  829. model.refresh();
  830. ]]>
  831. </script>
  832. <script type="javascript" ev:event="xforms-value-changed">
  833. <![CDATA[
  834. /*
  835. if( grd_holische.col != 1 ){
  836. return false;
  837. }
  838. var cur_row = grd_holische.row;
  839. cur_row = cur_row-1;
  840. var nodeList = instance1.selectNodes("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]endcnfmyn='Y']");
  841. var rCSV = getNodeListCSV(nodeList);
  842. var checkflag = model.getValue("/root/main/endflag");
  843. var check = model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/endflag");
  844. var num = model.getValue("/root/main/drholiordsche/drholiordschelist[" + cur_row + "]/seqno");
  845. num = num+1;
  846. model.resetInstanceNode("/root/send/updatedata");
  847. model.setValue("/root/send/updatedata/datalist", rCSV);
  848. if(checkflag == 'B') {
  849. return;
  850. }
  851. else{
  852. //마감승인여부를 체크시
  853. if(model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/endcnfmyn") == 'Y') {
  854. if(check == "C"){
  855. messageBox("마감취소된 내역은 마감을 할 수 없습니다. ","E999");
  856. model.setValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/endcnfmyn", 'C');
  857. return;
  858. }
  859. if(messageBox("선택된 휴진내역을 일정에 반영하시겠습니까?", "Q999") != 6)
  860. {
  861. model.setValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/endcnfmyn", 'C')
  862. //grd_ordschecrite.deleteItem(cur_row);
  863. // fSearchDrHoliSche("Y"); //이부분 확인 ????
  864. return false;
  865. }
  866. model.setValue("/root/send/setdata/prcsstat", '05');
  867. seqno = parseInt(model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/seqno"));
  868. //마이그레이션 데이터 마감승인
  869. if(seqno < "100"){
  870. if(submit("TXPMB00904")){
  871. if( model.getValue("/root/main/result/confirmdrholische[" + cur_row + "]/layoffunitcnt") == "0")
  872. {
  873. messageBox("선택하신 휴진내역에 진료일정이 없습니다.", "E999"," ");
  874. }
  875. messageBox("선택하신 휴진내역이 일정에 반영되었습니다. ","E999");
  876. grd_holische.deleteItem( cur_row+1 );
  877. }
  878. }else{
  879. if(submit("TXPMB00902")){
  880. // var cnt = getNodesetCount("/root/main/result/confirmdrholische");
  881. //체크된 데이터만 가져온다.
  882. // alert(cnt);
  883. // return;
  884. // for(var j = 1; j <=cnt; j++)
  885. // {
  886. if( model.getValue("/root/main/result/confirmdrholische[" + cur_row + "]/layoffunitcnt") == "0")
  887. {
  888. messageBox("선택하신 휴진내역에 진료일정이 없습니다.", "E999"," ");
  889. }
  890. //model.setValue("/root/main/drholiordsche/drholiordschelist[" + cur_row + "]/prcsstat", '05');
  891. messageBox("선택하신 휴진내역이 일정에 반영되었습니다. ","E999");
  892. grd_holische.deleteItem( cur_row+1 );
  893. // fSearchDrHoliSche("Y");
  894. }
  895. }
  896. }
  897. //마감승인여부를 해제시
  898. if(model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/endcnfmyn") == 'C') {
  899. if(messageBox("선택된 휴진내역을 마감취소 하시겠습니까?", "Q999") != 6) return false;
  900. //취소시 값입력
  901. model.setValue("/root/send/setdata/prcsstat", '07');
  902. seqno = parseInt(model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/seqno"));
  903. //마이그레이션 데이터 마감취소
  904. if(seqno < "100"){
  905. if(submit("TXPMB00905")){
  906. messageBox("선택하신 휴진내역이 취소되었습니다.. ","E999");
  907. // model.resetInstanceNode("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]");
  908. grd_holische.deleteItem( cur_row+1 );
  909. // fSearchDrHoliSche("Y");
  910. }
  911. }else{
  912. if(submit("TXPMB00903")){
  913. messageBox("선택하신 휴진내역이 취소되었습니다.. ","E999");
  914. // model.resetInstanceNode("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]");
  915. grd_holische.deleteItem( cur_row+1 );
  916. // fSearchDrHoliSche("Y");
  917. }
  918. }
  919. }
  920. model.setValue("/root/send/setdata/orddrid", model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/orddrid"));
  921. model.setValue("/root/send/setdata/orddeptcd", model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/orddeptcd"));
  922. model.setValue("/root/send/setdata/ordendresn", model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/ordendresn"));
  923. model.setValue("/root/send/setdata/fromdd", model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/fromdd"));
  924. model.setValue("/root/send/setdata/todd", model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/todd"));
  925. //submit("TRPMB00903");
  926. // fSearchDrHoliSche("Y");
  927. }
  928. */
  929. ]]>
  930. </script>
  931. </datagrid>
  932. <!-- <button id="button2" class="btn2_letter3" style="left:972px; top:88px; width:53px; height:19px; ">
  933. <caption>신규</caption>
  934. <script type="javascript" ev:event="DOMActivate">
  935. <![CDATA[
  936. /* model.resetInstanceNode("/root/send/setdata");
  937. //신규입력 작업구분 : I 세팅
  938. model.makeValue("/root/send/setdata/workflag","I");
  939. //날자 입력 항목에 오늘 날자 세팅
  940. var curDate = getCurrentDate();
  941. model.setValue("/root/main/fromdd", curDate);
  942. model.setValue("/root/send/setdata/fromdd",curDate);
  943. model.setValue("/root/send/setdata/todd",curDate);
  944. model.setValue("/root/send/setdata/drappdd",curDate);
  945. //휴진기간 구분 조건 세팅
  946. model.setValue("/root/send/setdata/fromflag", 'D'); //휴진기간 구분 전일로 세팅
  947. model.setValue("/root/send/setdata/toflag", 'D');
  948. model.refresh();
  949. */
  950. ]]>
  951. </script>
  952. </button>
  953. -->
  954. <!-- <button id="btn_save" class="btn5_letter3" style="left:1084px; top:53px; width:53px; height:19px; ">
  955. <caption>수정</caption>
  956. <script type="javascript" ev:event="DOMActivate">
  957. <![CDATA[
  958. var fixedrow = grd_holische.fixedRows;
  959. //필수입력 확인
  960. if(fcheck() == false) {
  961. return;
  962. }
  963. //날짜 입력 오류 체크
  964. if(daydatecheck() == false) {
  965. return;
  966. }
  967. if (!fCheckModify()) {
  968. messageBox("변경된 내역이 없어, 저장하지", "E007"); //변경된 내역이 없어, 저장하지 않았습니다.
  969. return;
  970. }
  971. else
  972. {
  973. if(messageBox("선택된 행의 의사휴진일정 내역을 수정 하시겠습니까?", "Q999") != 6) return;
  974. // if (fChkAutMemoCretList()) {
  975. model.makeValue("/root/send/setdata/workflag","U");
  976. model.setValue("/root/send/setdata/prcsstat", '-');
  977. // model.setValue("/root/send/updatedata/datalist", update);
  978. if(submit("TXPMB02501")) {
  979. messageBox("수정이","I002");
  980. // model.resetInstanceNode("/root/main");
  981. model.removeNodeset("/root/main/drholiordsche/drholiordschelist");
  982. /*
  983. model.setValue("/root/send/search/orddrid", model.getValue("/root/send/setdata/orddrid"));
  984. model.setValue("/root/send/search/orddeptcd", model.getValue("/root/send/setdata/orddeptcd"));
  985. model.setValue("/root/send/search/fromdd", model.getValue("/root/send/setdata/fromdd"));
  986. model.setValue("/root/send/search/todd", model.getValue("/root/send/setdata/todd"));
  987. model.setValue("/root/send/search/ordendcnfmyn", model.getValue("/root/send/setdata/ordendcnfmyn"));
  988. */
  989. submit("TRPMB00903");
  990. //btn_search.dispatch("DOMActivate");
  991. model.resetInstanceNode("/root/send");
  992. model.setValue("/root/send/setdata/fromflag", 'D'); //휴진기간 구분 전일로 세팅
  993. model.setValue("/root/send/setdata/toflag", 'D');
  994. model.makeValue("/root/send/setdata/workflag","I");
  995. //fclear();
  996. var curDate = getCurrentDate();
  997. model.setValue("/root/main/fromdd", curDate);
  998. model.setValue("/root/send/setdata/fromdd",curDate);
  999. model.setValue("/root/send/setdata/todd",curDate);
  1000. model.setValue("/root/send/setdata/drappdd",curDate);
  1001. //현재일자 + 1달
  1002. curDate = curDate.toDate().getAddDate(1,"M");
  1003. var nextDate = curDate.getFullYear();
  1004. nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  1005. nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  1006. model.setValue("/root/main/todd", nextDate);
  1007. }
  1008. }
  1009. model.refresh();
  1010. ]]>
  1011. </script>
  1012. </button> -->
  1013. <button id="button3" class="btn5_letter2" style="left:1149px; top:53px; width:42px; height:19px; ">
  1014. <caption>취소</caption>
  1015. <script type="javascript" ev:event="DOMActivate">
  1016. <![CDATA[
  1017. var rows = grd_holische.rows;
  1018. var cur_row = grd_holische.row -1; // 행 번호 가져오기
  1019. var instcd = getUserInfo("dutplceinstcd");
  1020. if( cur_row > 0 ){
  1021. var check = model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/endcnfmyn");
  1022. if(check == "Y") {
  1023. messageBox("마감된 이력은 삭제할 수", "E001");
  1024. return;
  1025. }
  1026. // 취소작업은 가능하도록 수정
  1027. // if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/pinstcd") != ""
  1028. // || model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/minstcd") != "") {
  1029. // messageBox("전자결재 데이터는 취소 / 마감승인 / 마감취소 불가능합니다. ", "E999");
  1030. // return;
  1031. // }
  1032. if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/histstat") == "C") {
  1033. messageBox("이력데이터(이력상태:C)는 삭제할 수 없습니다. ", "E999");
  1034. return;
  1035. }
  1036. // 등록한 사람만 삭제가능 20120113 조중래
  1037. // 진료행정팀(3310000000, 3310100000), 치과지원팀(2241400000) 소속은 누구든지 삭제 가능 20120822 조중래
  1038. // 교육수련팀 추가 및 원무공통코드 처리 by 조중래 20131105
  1039. var fstrgstrid = model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/fstrgstrid");
  1040. if (getUserId() != fstrgstrid && !fIsValidDept()) {
  1041. messageBox("휴진일정을 등록한 사람만 삭제처리 가능합니다.\r\n\r\n[문의사항]\r\n전문의 : 진료행정팀 / 치과지원팀\r\n전공의 : 교육수련팀 / 교육연구팀", "C000");
  1042. return;
  1043. }
  1044. if(messageBox("선택된 행의 의사휴진일정 내역을", "Q001") != 6) return;
  1045. //model.setValue("root/send/updatedata/datalist", grd_holische.getUpdateData("delete"));
  1046. model.makeValue("/root/send/setdata/workflag", "D");
  1047. model.setValue("/root/send/setdata/prcsstat", '03');
  1048. seqno = parseInt(model.getValue("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]/seqno"));
  1049. // model.alert(seqno);
  1050. // return;
  1051. //마이그레이션 데이터 취소시 이력X
  1052. if(seqno < "100"){
  1053. if( submit("TXPMB02502",true) ) {
  1054. btn_search.dispatch("DOMActivate");
  1055. messageBox("신청한 휴진일정이 취소 ", "I001");
  1056. model.resetInstanceNode("/root/send");
  1057. model.setValue("/root/send/setdata/fromflag", 'D');
  1058. model.setValue("/root/send/setdata/toflag", 'D');
  1059. model.makeValue("/root/send/setdata/workflag","I");
  1060. var curDate = getCurrentDate();
  1061. model.setValue("/root/main/fromdd", curDate);
  1062. model.setValue("/root/send/setdata/fromdd",curDate);
  1063. model.setValue("/root/send/setdata/todd",curDate);
  1064. model.setValue("/root/send/setdata/drappdd",curDate);
  1065. //현재일자 + 1달
  1066. curDate = curDate.toDate().getAddDate(1,"M");
  1067. var nextDate = curDate.getFullYear();
  1068. nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  1069. nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  1070. model.setValue("/root/main/todd", nextDate);
  1071. }
  1072. }else{
  1073. if( submit("TXPMB02501",true) ) {
  1074. btn_search.dispatch("DOMActivate");
  1075. messageBox("신청한 휴진일정이 취소 ", "I001");
  1076. model.resetInstanceNode("/root/send");
  1077. model.setValue("/root/send/setdata/fromflag", 'D'); //휴진기간 구분 전일로 세팅
  1078. model.setValue("/root/send/setdata/toflag", 'D');
  1079. model.makeValue("/root/send/setdata/workflag","I");
  1080. var curDate = getCurrentDate();
  1081. model.setValue("/root/main/fromdd", curDate);
  1082. model.setValue("/root/send/setdata/fromdd",curDate);
  1083. model.setValue("/root/send/setdata/todd",curDate);
  1084. model.setValue("/root/send/setdata/drappdd",curDate);
  1085. //현재일자 + 1달
  1086. curDate = curDate.toDate().getAddDate(1,"M");
  1087. var nextDate = curDate.getFullYear();
  1088. nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  1089. nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  1090. model.setValue("/root/main/todd", nextDate);
  1091. }
  1092. }
  1093. }
  1094. model.refresh();
  1095. ]]>
  1096. </script>
  1097. </button>
  1098. <line id="line7" class="line_3" style="x1:1px; y1:127px; x2:1195px; y2:127px; "/>
  1099. <caption id="caption8" class="tit_2" style="left:6px; top:142px; width:160px; height:13px; ">의사휴진일정내역리스트</caption>
  1100. <line id="line1" class="line_1" style="x1:0px; y1:158px; x2:1194px; y2:158px; "/>
  1101. <caption id="caption9" class="cell_1" style="left:0px; top:104px; width:62px; height:23px; ">진료의사</caption>
  1102. <caption id="caption11" class="cell_1" style="left:0px; top:80px; width:62px; height:23px; ">진료과</caption>
  1103. <select1 id="combo1" ref="/root/send/setdata/orddeptcd" class="combo_s_essential" navindex="2" appearance="minimal" style="left:65px; top:81px; width:120px; height:19px; ">
  1104. <choices>
  1105. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  1106. <label ref="nm"/>
  1107. <value ref="cd"/>
  1108. </itemset>
  1109. </choices>
  1110. <script type="javascript" ev:event="xforms-value-changed">
  1111. <![CDATA[
  1112. combo2.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + combo1.value + "']";
  1113. model.setValue("/root/send/setdata/orddrid", "");
  1114. combo2.refresh();
  1115. ]]>
  1116. </script>
  1117. </select1>
  1118. <select1 id="combo2" ref="/root/send/setdata/orddrid" class="combo_s_essential" appearance="minimal" style="left:65px; top:106px; width:120px; height:19px; ">
  1119. <choices>
  1120. <itemset nodeset="/root/init/orddrid/orddridlist">
  1121. <label ref="nm"/>
  1122. <value ref="cd"/>
  1123. </itemset>
  1124. </choices>
  1125. </select1>
  1126. <select1 id="combo3" ref="/root/send/setdata/ordendresn" appearance="minimal" style="left:444px; top:81px; width:71px; height:19px; ">
  1127. <choices>
  1128. <itemset nodeset="/root/hidden/P0037list/P0037">
  1129. <label ref="cdnm"/>
  1130. <value ref="cdid"/>
  1131. </itemset>
  1132. </choices>
  1133. </select1>
  1134. <input id="input9" ref="/root/send/setdata/region" style="left:517px; top:81px; width:133px; height:19px; "/>
  1135. <caption id="caption13" class="cell_1" style="left:188px; top:104px; width:175px; height:23px; ">휴진기간(시작일자/종료일자)</caption>
  1136. <input id="input1" ref="/root/send/setdata/fromdd" class="input_default" inputtype="date" appearance="input" style="left:366px; top:106px; width:84px; height:19px; "/>
  1137. <select1 id="combo4" ref="/root/send/setdata/fromflag" appearance="minimal" style="left:452px; top:106px; width:50px; height:19px; ">
  1138. <choices>
  1139. <itemset nodeset="/root/init/P0316list/P0316">
  1140. <label ref="cdnm"/>
  1141. <value ref="cdid"/>
  1142. </itemset>
  1143. </choices>
  1144. <script type="javascript" ev:event="xforms-value-changed">
  1145. <![CDATA[
  1146. var flag = model.getValue("/root/send/setdata/fromflag");
  1147. if(flag == "D" || flag == "A" ){
  1148. model.setValue("/root/send/setdata/fromtm", '0830'); //휴진기간 구분 전일로 세팅
  1149. }
  1150. else if(flag == "P" ){
  1151. model.setValue("/root/send/setdata/fromtm", '1330'); //휴진기간 구분 전일로 세팅
  1152. }
  1153. else if(flag == "N" ){
  1154. model.setValue("/root/send/setdata/fromtm", '1730'); //휴진기간 구분 전일로 세팅
  1155. }
  1156. else{
  1157. model.setValue("/root/send/setdata/fromtm", '0830'); //휴진기간 구분 전일로 세팅
  1158. }
  1159. input7.refresh();
  1160. ]]>
  1161. </script>
  1162. </select1>
  1163. <caption id="caption14" style="left:545px; top:106px; width:20px; height:19px; font-weight:bold; text-align:center; vertical-align:middle; ">~</caption>
  1164. <select1 id="combo5" ref="/root/send/setdata/toflag" appearance="minimal" style="left:652px; top:106px; width:50px; height:19px; ">
  1165. <choices>
  1166. <itemset nodeset="/root/init/P0316list/P0316">
  1167. <label ref="cdnm"/>
  1168. <value ref="cdid"/>
  1169. </itemset>
  1170. </choices>
  1171. <script type="javascript" ev:event="xforms-value-changed">
  1172. <![CDATA[
  1173. var flag = model.getValue("/root/send/setdata/toflag");
  1174. if(flag == "D" ){
  1175. model.setValue("/root/send/setdata/totm", '2359'); //휴진기간 구분 전일로 세팅
  1176. }
  1177. else if(flag == "A" ){
  1178. model.setValue("/root/send/setdata/totm", '1230'); //휴진기간 구분 전일로 세팅
  1179. }
  1180. else if(flag == "P" ){
  1181. model.setValue("/root/send/setdata/totm", '1730'); //휴진기간 구분 전일로 세팅
  1182. }
  1183. else if(flag == "N" ){
  1184. model.setValue("/root/send/setdata/totm", '2359'); //휴진기간 구분 전일로 세팅
  1185. }
  1186. else{
  1187. model.setValue("/root/send/setdata/totm", '2359'); //휴진기간 구분 전일로 세팅
  1188. }
  1189. input8.refresh();
  1190. ]]>
  1191. </script>
  1192. </select1>
  1193. <input id="input2" ref="/root/send/setdata/todd" class="input_default" inputtype="date" appearance="input" style="left:566px; top:106px; width:84px; height:19px; "/>
  1194. <caption id="caption15" class="cell_1" style="left:652px; top:80px; width:107px; height:23px; ">외래대진진료의사</caption>
  1195. <input id="input3" ref="/root/send/setdata/oupdtorddrnm" style="left:762px; top:81px; width:67px; height:19px; "/>
  1196. <caption id="caption16" class="cell_1" style="left:832px; top:80px; width:107px; height:23px; ">입원대진진료의사</caption>
  1197. <input id="input4" ref="/root/send/setdata/iupdtorddrnm" style="left:942px; top:81px; width:69px; height:19px; "/>
  1198. <caption id="caption17" class="cell_1" style="left:748px; top:104px; width:59px; height:23px; ">비고</caption>
  1199. <input id="input5" ref="/root/send/setdata/remfact" style="left:810px; top:106px; width:383px; height:19px; "/>
  1200. <caption id="caption18" class="cell_1" style="left:1014px; top:80px; width:72px; height:23px; ">의사신청일</caption>
  1201. <caption id="caption19" class="cell_1" style="left:188px; top:80px; width:199px; height:23px; ">국내외구분 / 휴진사유 / 출장지역</caption>
  1202. <input id="input6" ref="/root/send/setdata/drappdd" class="input_default" inputtype="date" appearance="input" style="left:1088px; top:81px; width:105px; height:19px; "/>
  1203. <button id="button1" class="btn2_letter2" style="left:1105px; top:53px; width:42px; height:19px; ">
  1204. <caption>신청</caption>
  1205. <script type="javascript" ev:event="DOMActivate">
  1206. <![CDATA[
  1207. // 본원 및 칠곡 진료행정팀, 치과지원팀 이외의 부서에서는 신청이 되지 않도록 제어 추가 by 조중래 20130528
  1208. // 교육수련팀 추가 및 원무공통코드처리 by 조중래 20131105
  1209. if (!fIsValidDept()) {
  1210. messageBox("휴진일정 신청은 전자결재를 통해서만 가능합니다. \r\n\r\n[문의사항]\r\n전문의 : 진료행정팀 / 치과지원팀\r\n전공의 : 교육수련팀 / 교육연구팀", "C000");
  1211. return;
  1212. }
  1213. // 치과소속 사용자의 경우, 치과만 처리 가능하도록 제어 추가 by 조중래 20170609
  1214. var dutPlceInstCd = getUserInfo("dutplceinstcd");
  1215. var orddeptcd = model.getValue("/root/send/setdata/orddeptcd");
  1216. var reqdeptno = model.getValue("/root/init/orddeptcd/orddeptcdlist[cd='" + orddeptcd + "']/reqdeptno").substr(0, 2);
  1217. var dutPlceCd = getUserInfo("dutplcecd");
  1218. if (dutPlceInstCd != "033" && reqdeptno != "55" && dutPlceCd == "2240000000") {
  1219. messageBox("치과소속의 의사만 조회/신청 가능합니다.", "C000");
  1220. return false;
  1221. }
  1222. var fixedrow = grd_holische.fixedRows;
  1223. // 신규입력창 필수입력 확인
  1224. if(fcheck() == false) {
  1225. return;
  1226. }
  1227. //날짜 입력 오류 체크
  1228. if(daydatecheck() == false) {
  1229. return;
  1230. }
  1231. if(messageBox("휴진신청을 하시겠습니까?", "Q999") != 6) return;
  1232. model.makeValue("/root/send/setdata/workflag","I");
  1233. model.setValue("/root/send/setdata/prcsstat", '01');
  1234. var rows = grd_holische.rows;
  1235. //var rows = grd_holische.fixedrows;
  1236. rows = rows-1
  1237. if(submit("TXPMB02501")) {
  1238. messageBox("신청이","I002");
  1239. if(submit("TRPMB00903")){
  1240. model.makeNode("/root/main/drholiordsche/drholiordschelist["+rows+"]");
  1241. model.copyNode("/root/main/drholiordsche/drholiordschelist["+rows+"]", "/root/temp/drholiordsche/drholiordschelist");
  1242. model.refresh();
  1243. }
  1244. model.resetInstanceNode("/root/send");
  1245. model.setValue("/root/send/setdata/fromflag", 'D'); //휴진기간 구분 전일로 세팅
  1246. model.setValue("/root/send/setdata/toflag", 'D');
  1247. model.makeValue("/root/send/setdata/workflag","I");
  1248. var curDate = getCurrentDate();
  1249. model.setValue("/root/main/fromdd", curDate);
  1250. model.setValue("/root/send/setdata/fromdd",curDate);
  1251. model.setValue("/root/send/setdata/todd",curDate);
  1252. model.setValue("/root/send/setdata/drappdd",curDate);
  1253. //현재일자 + 1달
  1254. curDate = curDate.toDate().getAddDate(1,"M");
  1255. var nextDate = curDate.getFullYear();
  1256. nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  1257. nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  1258. model.setValue("/root/main/todd", nextDate);
  1259. //btn_search.dispatch("DOMActivate");
  1260. }
  1261. model.refresh();
  1262. // }
  1263. ]]>
  1264. </script>
  1265. </button>
  1266. <line id="line2" class="line_2" style="x1:0px; y1:102px; x2:1194px; y2:102px; "/>
  1267. <button id="button2" class="btn2_letter4" style="left:980px; top:136px; width:64px; height:19px; ">
  1268. <caption>마감승인</caption>
  1269. <script type="javascript" ev:event="DOMActivate">
  1270. <![CDATA[
  1271. var startRow = grd_holische.fixedRows;
  1272. var endRow = grd_holische.rows;
  1273. startRow = startRow-1;
  1274. endRow = endRow-1;
  1275. var instcd = getUserInfo("dutplceinstcd");
  1276. //마감체크 내역 확인
  1277. for( var i = startRow; i < endRow; i++){
  1278. if(model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/endcnfmyn") == 'Y' ){
  1279. messageBox("선택한 항목중에 이미 마감된 휴진일정이 존재합니다. 확인 후 다시 시도해 주세요. ","E999");
  1280. return;
  1281. }
  1282. // 선택된 데이터만 검증실시
  1283. if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/check") == "Y") {
  1284. if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/pinstcd") != ""
  1285. || model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/minstcd") != "") {
  1286. messageBox("전자결재 데이터는 취소 / 마감승인 / 마감취소 불가능합니다. ", "E999");
  1287. return;
  1288. }
  1289. if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/histstat") == "C") {
  1290. messageBox("이력데이터(이력상태:C)는 취소 / 마감승인 / 마감취소 불가능합니다. ", "E999");
  1291. return;
  1292. }
  1293. }
  1294. }
  1295. /*
  1296. model.setValue("/root/send/updatedata/datalist", grd_holische.getUpdateData());
  1297. model.alert(model.getValue("/root/send/updatedata/datalist"));
  1298. return;
  1299. // return;
  1300. */
  1301. var nodeList = instance1.selectNodes("/root/main/drholiordsche/drholiordschelist[check='Y']");
  1302. var rCSV = getNodeListCSV(nodeList);
  1303. if( rCSV == "" || rCSV == null || rCSV == undefined){
  1304. //messageBox("일정을 생성할 기준자료가 선택되지 않았습니다.", "E999", "");
  1305. messageBox("마감할 휴진일정이 선택되지", "E007");
  1306. return false;
  1307. }
  1308. if(messageBox("선택된 휴진내역을 일정에 반영하시겠습니까?", "Q999") != 6){
  1309. return;
  1310. }
  1311. model.resetInstanceNode("/root/send/updatedata");
  1312. model.setValue("/root/send/updatedata/datalist", rCSV);
  1313. //return;
  1314. if(submit("TXPMB00902")){
  1315. // var srow = grd_holische.fixedRows;
  1316. // var erow = grd_holische.rows;
  1317. // var checkRow = startRow;
  1318. //
  1319. // checkRow = srow;
  1320. // for( var i = srow; i < erow; i++){
  1321. //
  1322. // //model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + (i - 1) + "]/check")
  1323. // if( grd_holische.valueMatrix( checkRow, grd_holische.colRef("check") ) == 'Y' ){
  1324. // //디비에서 삭제한 데이터를 그리드에서 삭제한다.
  1325. // grd_holische.deleteItem(checkRow);
  1326. // }else{
  1327. // checkRow++;
  1328. // }
  1329. // }
  1330. //grd_ordschecrite.deleteItem( cur_row);
  1331. //model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  1332. messageBox("선택하신 휴진내역이 일정에 반영되었습니다. ","E999");
  1333. // fSearchDrHoliSche("Y");
  1334. // 재조회 실시
  1335. btn_search.dispatch("DOMActivate");
  1336. }
  1337. ]]>
  1338. </script>
  1339. </button>
  1340. <button id="button4" class="btn5_letter4" style="left:1128px; top:136px; width:64px; height:19px; ">
  1341. <caption>마감취소</caption>
  1342. <script type="javascript" ev:event="DOMActivate">
  1343. <![CDATA[
  1344. var startRow = grd_holische.fixedRows;
  1345. var endRow = grd_holische.rows;
  1346. startRow = startRow-1;
  1347. endRow = endRow;
  1348. var instcd = getUserInfo("dutplceinstcd");
  1349. //마감체크 내역 확인
  1350. for( var i = startRow; i < endRow; i++){
  1351. if(model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/endcnfmyn") == 'N' ){
  1352. messageBox("선택한 항목중에 마감취소 할 휴진일정이 존재하지 않는 항목이 존재합니다. 확인 후 다시 시도해 주세요. ","E999");
  1353. return;
  1354. }
  1355. // 선택된 데이터만 검증실시
  1356. if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/check") == "Y") {
  1357. // 취소작업은 가능하도록 수정
  1358. // if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/pinstcd") != ""
  1359. // || model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/minstcd") != "") {
  1360. // messageBox("전자결재 데이터는 취소 / 마감승인 / 마감취소 불가능합니다. ", "E999");
  1361. // return;
  1362. // }
  1363. if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/histstat") == "C") {
  1364. messageBox("이력데이터(이력상태:C)는 취소 / 마감승인 / 마감취소 불가능합니다. ", "E999");
  1365. return;
  1366. }
  1367. }
  1368. }
  1369. var nodeList = instance1.selectNodes("/root/main/drholiordsche/drholiordschelist[check='Y']");
  1370. var rCSV = getNodeListCSV(nodeList);
  1371. if( rCSV == "" || rCSV == null || rCSV == undefined){
  1372. //messageBox("일정을 생성할 기준자료가 선택되지 않았습니다.", "E999", "");
  1373. messageBox("마감취소할 휴진일정이 선택되지", "E007");
  1374. return false;
  1375. }
  1376. // 등록한 사람만 삭제가능 20120731 조중래
  1377. // 진료행정팀(3310000000, 3310100000), 치과지원팀(2241400000) 소속은 누구든지 삭제 가능 20120822 조중래
  1378. // 교육수련팀 추가 및 원무공통코드 처리 by 조중래 20131105
  1379. for( var i = startRow; i < endRow; i++){
  1380. if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/check") == "Y") {
  1381. var fstrgstrid = model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/fstrgstrid");
  1382. if (getUserId() != fstrgstrid && !fIsValidDept()) {
  1383. messageBox("휴진일정을 등록한 사람만 삭제처리 가능합니다.\r\n\r\n[문의사항]\r\n전문의 : 진료행정팀 / 치과지원팀\r\n전공의 : 교육수련팀 / 교육연구팀", "C000");
  1384. return;
  1385. }
  1386. }
  1387. }
  1388. // 과거이력 마감 취소 시에는 진료행정팀 / 치과지원팀 통하도록 메세지 추가 by 조중래 20120822
  1389. // 교육수련팀 추가 및 원무공통코드 제어 추가 by 조중래 20131105
  1390. for( var i = startRow; i < endRow; i++){
  1391. if (model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/check") == "Y") {
  1392. var fromdd = model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/fromdd");
  1393. if (fromdd < getCurrentDate() && !fIsValidDept()) {
  1394. messageBox("과거건에 대한 마감취소는 반드시 진료행정팀 / 치과지원팀 / 교육수련팀을 통해서 진행하시기 바랍니다.", "E000");
  1395. return;
  1396. }
  1397. }
  1398. }
  1399. if(messageBox("선택된 휴진내역을 마감취소 하시겠습니까?", "Q999") != 6){
  1400. return false;
  1401. }
  1402. model.resetInstanceNode("/root/send/updatedata");
  1403. model.setValue("/root/send/updatedata/datalist", rCSV);
  1404. //model.alert(model.getValue("/root/send/updatedata/datalist"));
  1405. if(submit("TXPMB00903")){
  1406. // var srow = grd_holische.fixedRows;
  1407. // var erow = grd_holische.rows;
  1408. // var checkRow = startRow;
  1409. //
  1410. // checkRow = srow;
  1411. // for( var i = srow; i < erow; i++){
  1412. //
  1413. // //model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + (i - 1) + "]/check")
  1414. // if( grd_holische.valueMatrix( checkRow, grd_holische.colRef("check") ) == 'Y' ){
  1415. // //디비에서 삭제한 데이터를 그리드에서 삭제한다.
  1416. // grd_holische.deleteItem(checkRow);
  1417. // }else{
  1418. // checkRow++;
  1419. // }
  1420. // }
  1421. messageBox("선택하신 휴진내역이 취소되었습니다.. ","E999");
  1422. // 재조회 실시
  1423. btn_search.dispatch("DOMActivate");
  1424. // model.resetInstanceNode("/root/main/drholiordsche/drholiordschelist["+ cur_row +"]");
  1425. // grd_holische.deleteItem( cur_row+1 );
  1426. // fSearchDrHoliSche("Y");
  1427. }
  1428. ]]>
  1429. </script>
  1430. </button>
  1431. <button id="btn_deselectall" class="btn2_letter4" style="left:912px; top:136px; width:64px; height:19px; ">
  1432. <caption>전체해제</caption>
  1433. <script type="javascript" ev:event="DOMActivate">
  1434. <![CDATA[
  1435. for(i=1; i < grd_holische.rows-1; i++) {
  1436. model.setValue("/root/main/drholiordsche/drholiordschelist[" + i + "]/check","C");
  1437. grd_holische.rowstatus(i) = 0;
  1438. }
  1439. model.refresh();
  1440. ]]>
  1441. </script>
  1442. </button>
  1443. <button id="btn_selectall" class="btn2_letter4" style="left:843px; top:136px; width:64px; height:19px; ">
  1444. <caption>전체선택</caption>
  1445. <script type="javascript" ev:event="DOMActivate">
  1446. <![CDATA[
  1447. for(i=1; i < grd_holische.rows-1; i++) {
  1448. model.setValue("/root/main/drholiordsche/drholiordschelist[" + i + "]/check","Y");
  1449. grd_holische.rowstatus(i) = 1;
  1450. }
  1451. model.refresh();
  1452. /*
  1453. if(model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/check") == 'Y' ){
  1454. grd_holische.rowStatus(i) = 1;
  1455. //grd_holische.addStatus(i, "insert");
  1456. // model.alert(model.getValue("/root/main/drholiordsche/drholiordschelist["+ i +"]/seqno"));
  1457. }
  1458. // alert(i + " : " + grd_holische.rowStatus(i));
  1459. */
  1460. ]]>
  1461. </script>
  1462. </button>
  1463. <input id="input7" ref="/root/send/setdata/fromtm" class="input_default" format="hh:nn" style="left:505px; top:106px; width:40px; height:19px; ">
  1464. <script type="javascript" ev:event="onkeyup">
  1465. <![CDATA[
  1466. var code = window.event.keyCode;
  1467. if ((code >= 48 && code <= 57) || (code >= 96 && code <= 105) || code == 8 || code == 37 || code == 39 || code == 46){ // 숫자, 백스페이스, delete 만 사용가능
  1468. return;
  1469. }
  1470. alert("숫자만 입력 가능 합니다!");
  1471. ]]>
  1472. </script>
  1473. </input>
  1474. <input id="input8" ref="/root/send/setdata/totm" class="input_default" format="hh:nn" style="left:705px; top:106px; width:40px; height:19px; ">
  1475. <script type="javascript" ev:event="onkeyup">
  1476. <![CDATA[
  1477. var code = window.event.keyCode;
  1478. if ((code >= 48 && code <= 57) || (code >= 96 && code <= 105) || code == 8 || code == 37 || code == 39 || code == 46){ // 숫자, 백스페이스, delete 만 사용가능
  1479. return;
  1480. }
  1481. alert("숫자만 입력 가능 합니다!");
  1482. ]]>
  1483. </script>
  1484. </input>
  1485. <button id="button5" class="btn2_letter4" style="left:1055px; top:136px; width:64px; height:19px; ">
  1486. <caption>엑셀저장</caption>
  1487. <script type="javascript" ev:event="DOMActivate">
  1488. <![CDATA[
  1489. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  1490. if (fileName != "") {
  1491. grd_holische.saveExcel(fileName, "sheet1");
  1492. }
  1493. ]]>
  1494. </script>
  1495. </button>
  1496. <select1 id="combo7" ref="/root/send/setdata/doflag" appearance="minimal" style="left:390px; top:81px; width:52px; height:19px; ">
  1497. <choices>
  1498. <item>
  1499. <label/>
  1500. <value/>
  1501. </item>
  1502. <item>
  1503. <label>국내</label>
  1504. <value>D</value>
  1505. </item>
  1506. <item>
  1507. <label>국외</label>
  1508. <value>O</value>
  1509. </item>
  1510. </choices>
  1511. <script type="javascript" ev:event="xforms-value-changed">
  1512. <![CDATA[
  1513. var curDate = getCurrentDate();
  1514. // 공통코드 연동관계상 D의 경우에는 D, A를 함께 조회
  1515. if (model.getValue("/root/send/setdata/doflag") == 'D') {
  1516. // 휴진사유 재설정
  1517. copyNodesetType("/root/hidden/P0037list/P0037", "/root/init/P0037list/P0037[detldesc = 'H' and cdnm != '휴가' and (cdval = 'A' or cdval = 'D') and valifromdd <= '" + curDate + "' and valitodd >= '" + curDate + "']");
  1518. // A의 경우에는 A만 조회
  1519. } else {
  1520. // 휴진사유 재설정
  1521. copyNodesetType("/root/hidden/P0037list/P0037", "/root/init/P0037list/P0037[detldesc = 'H' and cdnm != '휴가' and (cdval = 'A' or cdval = 'O') and valifromdd <= '" + curDate + "' and valitodd >= '" + curDate + "']");
  1522. }
  1523. combo3.refresh();
  1524. ]]>
  1525. </script>
  1526. </select1>
  1527. <button id="button6" class="btn2_letter5" style="left:1028px; top:53px; width:75px; height:19px; ">
  1528. <caption>엑셀업로드</caption>
  1529. <script type="javascript" ev:event="DOMActivate">
  1530. <![CDATA[
  1531. fLoadExcel();
  1532. model.dispatch("xforms-ready");
  1533. fSearchDrHoliSche("Y");
  1534. model.refresh();
  1535. ]]>
  1536. </script>
  1537. </button>
  1538. <datagrid id="grd_excel" nodeset="/root/excel/ordinfo" visibility="hidden" caption="진료과^진료의사^국내외구분^휴진사유^휴진시작일^시작시간^휴진종료일^종료시간^비고" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:420px; top:255px; width:690px; height:255px; ">
  1539. <col ref="orddeptnm"/>
  1540. <col ref="orddrnm"/>
  1541. <col ref="gubun"/>
  1542. <col ref="reason"/>
  1543. <col ref="fromdd"/>
  1544. <col ref="fromtm"/>
  1545. <col ref="todd"/>
  1546. <col ref="totm"/>
  1547. <col ref="etc"/>
  1548. </datagrid>
  1549. </group>
  1550. <group id="group2" scroll="auto" style="left:0px; top:747px; width:1195px; height:27px; ">
  1551. <button id="btn_saveSche7" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  1552. <caption>초기화</caption>
  1553. <script type="javascript" ev:event="DOMActivate">
  1554. <![CDATA[
  1555. fInitialize();
  1556. ]]>
  1557. </script>
  1558. </button>
  1559. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  1560. <shape id="rectangle1" appearance="rectangle" style="left:150px; top:5px; width:18px; height:18px; background-color:#FFCCFF; border-color:#c0c0c0; "/>
  1561. <caption id="caption12" style="left:180px; top:5px; width:296px; height:20px; ">타병원 전자결재 신청데이터(수정 및 처리불가)</caption>
  1562. <shape id="rectangle2" appearance="rectangle" style="left:465px; top:5px; width:18px; height:18px; background-color:#b2b2b2; border-color:#c0c0c0; "/>
  1563. <caption id="caption20" style="left:495px; top:5px; width:105px; height:20px; ">이력데이터(Y→C)</caption>
  1564. </group>
  1565. <button id="button20" class="btn3_letter8" style="left:0px; top:752px; width:68px; height:22px; ">
  1566. <caption>진료일정상세조회</caption>
  1567. <script type="javascript" ev:event="DOMActivate">
  1568. <![CDATA[
  1569. cur_row = grd_holische.row;
  1570. if(cur_row > 0){
  1571. setParameter("SMPMB00800_ORDDEPTCD", grd_holische.valueMatrix( cur_row, 3));
  1572. setParameter("SMPMB00800_ORDDRID", grd_holische.valueMatrix( cur_row, 4 ));
  1573. }
  1574. open("SMPMB00800", "1", "50", "50", "SMPMB00800", "", "");
  1575. ]]>
  1576. </script>
  1577. </button>
  1578. </xhtml:body>
  1579. </xhtml:html>