SMRSC06301_CSR 마감 시간 등록.xrw 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <?xml-stylesheet type="text/css" href="C:/CMCProject/application/webapps/com/commonweb/css/common.css" ?>
  4. <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">
  5. <xhtml:head>
  6. <xhtml:title>CSR 마감시간 관리</xhtml:title>
  7. <model id="model1">
  8. <instance id="instance1">
  9. <root xmlns="">
  10. <main>
  11. <csrtmlist>
  12. <csrreqdeptcd/>
  13. <daykind/>
  14. <reqseq/>
  15. <clotm/>
  16. <reqimpostm/>
  17. <reqposfromtm/>
  18. <bar/>
  19. <reqpostotm/>
  20. <cmt/>
  21. <dinfaplyn/>
  22. <lastupdtrid/>
  23. <usernm/>
  24. <lastupdtdt/>
  25. <fstrgstdt/>
  26. <instcd/>
  27. <csrreqdeptnm/>
  28. <daykindnm/>
  29. </csrtmlist>
  30. <csrreqdeptlist>
  31. <csrreqdeptnm/>
  32. <csrreqdeptcd/>
  33. </csrreqdeptlist>
  34. <csrdeptnm>
  35. <csrdeptnm/>
  36. </csrdeptnm>
  37. </main>
  38. <send>
  39. <instcd/>
  40. <csrtmlist/>
  41. <daykind/>
  42. <deptcd/>
  43. <deptnm/>
  44. <csrreqdeptcd2/>
  45. </send>
  46. <init>
  47. <csrdept>
  48. <label>외래</label>
  49. <value>1</value>
  50. <label>병동</label>
  51. <value>2</value>
  52. <label>OR</label>
  53. <value>3</value>
  54. <label>ER</label>
  55. <value>4</value>
  56. <label>기타</label>
  57. <value>5</value>
  58. </csrdept>
  59. <daykind>
  60. </daykind>
  61. </init>
  62. <hidden/>
  63. <temp/>
  64. </root>
  65. </instance>
  66. <script type="javascript">
  67. <![CDATA[
  68. var searchFlag = "0";
  69. var curDept = 0;
  70. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  71. function fInitialize() {
  72. model.removeNodeset("/root/main/csrtmlist");
  73. model.resetInstanceNode("/root/send");
  74. model.refresh();
  75. misfGridInit(grd_csrtmlist);
  76. misfGridInit(grd_csrreqdeptlist);
  77. //기관코드 셋팅
  78. //misfComboComCdList("Z0007", cmb_instcd);
  79. //rszfUserReqInstList(cmb_instcd,getUserInfo("userid"),"5","B");
  80. //요일구분(시간상 급해서 하드코딩으로 바꿈 주말에 급히 필요하나 공통코드 만들방법X)
  81. // misfGridComboComCdList("R0270",grd_csrtmlist,"daykind");
  82. //misfGridComboComCdList("R0269",grd_csrtmlist,"csrreqdeptcd");
  83. //misfGridComboComCdList("R0269",grd_csrreqdeptlist,"csrreqdeptcd");
  84. //copyNodeType("/root/main/csrreqdeptlist", "/root/init/appendcd/R20691");
  85. // misfComboComCdListMulti("Z0007,R0270", "cmb_instcd,rdo_daykind");
  86. misfComboComCdListMulti("Z0007", "cmb_instcd");
  87. // rszfComboAppendBlankChild("rdo_daykind");
  88. //misfMsterDetailSet(grd_csrtmlist,null,"TRRSC06301","Y"); //마스터 설정
  89. model.resetInstanceNode("/root/send/reqData");
  90. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  91. //화면 권한 설정
  92. btn_save.disabled = !(checkAuth("X"));
  93. btn_prt.disabled= !(checkAuth("P"));
  94. model.refresh();
  95. }
  96. function fsearch(){
  97. // var updtdata = getGridUpdateData(grd_csrtmlist);
  98. //
  99. // //기관코드 값 체크
  100. // if ( updtdata != "") {
  101. // var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
  102. // if (ret != 6) { // not OK
  103. // return;
  104. // }
  105. // }
  106. //
  107. var iRow = grd_csrreqdeptlist.row;
  108. var iCol = grd_csrreqdeptlist.colRef("csrreqdeptcd");
  109. model.makeValue("/root/send/instcd", cmb_instcd.value);
  110. model.makeValue("/root/send/daykind", rdo_daykind.value);
  111. model.makeValue("/root/send/csrreqdeptcd", grd_csrreqdeptlist.valueMatrix(iRow, iCol));
  112. submit("TRRSC06301");
  113. var daykind;
  114. var csrreqdeptcd;
  115. for(var i = 1; i < grd_csrtmlist.rows; i++) {
  116. daykind = grd_csrtmlist.valueMatrix(i, grd_csrtmlist.colRef("daykind"));
  117. csrreqdeptcd = grd_csrtmlist.valueMatrix(i, grd_csrtmlist.colRef("csrreqdeptcd"));
  118. grd_csrtmlist.valueMatrix(i, grd_csrtmlist.colRef("csrreqdeptnm")) = model.getValue("/root/main/csrreqdeptlist[csrreqdeptcd='" + csrreqdeptcd + "']/csrreqdeptnm");
  119. grd_csrtmlist.valueMatrix(i ,grd_csrtmlist.colRef("daykindnm")) = model.getValue("/root/init/appendcd/R02701[cdid='"+ daykind +"']/cdnm");
  120. }
  121. //misfMsterDetailRetrieve();
  122. misfSetReadOnlyCol(grd_csrtmlist, "csrreqdeptcd,daykind, reqseq", true);
  123. model.refresh();
  124. fChngReqPosTm();
  125. searchFlag = "1";
  126. }
  127. function fsave(){
  128. if(!checkKeyColumn("grd_csrtmlist")) return;
  129. var updtdata = getGridUpdateData(grd_csrtmlist);
  130. if (updtdata == "")
  131. {
  132. messageBox("변경된 데이터가","I004");
  133. return;
  134. }
  135. rtn = messageBox("", "Q002");
  136. if(rtn != "6" ) return false;
  137. model.makeValue("/root/send/reqdata/csrtmlist", updtdata);
  138. submit("TXRSC06301");
  139. btn_search.dispatch("DOMActivate");
  140. }
  141. function fCheckTime()
  142. {
  143. if(grd_csrtmlist.col == grd_csrtmlist.colRef("clotm"))
  144. {
  145. var sTime = grd_csrtmlist.valueMatrix(grd_csrtmlist.row, grd_csrtmlist.colRef("clotm"));
  146. if(sTime == "" || sTime == null)
  147. {
  148. return;
  149. }
  150. if(sTime.length != 4)
  151. {
  152. messageBox("네자리를 ","C001");
  153. grd_csrtmlist.valueMatrix(grd_csrtmlist.row, grd_csrtmlist.colRef("clotm")) = "";
  154. return;
  155. }
  156. var sFrontTime = sTime.substr(0, 2);
  157. var sBackTime = sTime.substr(2, 2);
  158. if(parseInt(sFrontTime) > 24)
  159. {
  160. messageBox("24시를 ","E001");
  161. grd_csrtmlist.valueMatrix(grd_csrtmlist.row, grd_csrtmlist.colRef("clotm")) = "";
  162. return;
  163. }
  164. if(parseInt(sBackTime) > 59)
  165. {
  166. messageBox("59분을 ","E001");
  167. grd_csrtmlist.valueMatrix(grd_csrtmlist.row, grd_csrtmlist.colRef("clotm")) = "";
  168. return;
  169. }
  170. }
  171. }
  172. function getCsrDeptList() {
  173. model.makeValue("/root/send/reqData/cdgrupid", "R0269");
  174. model.makeValue("/root/send/reqData/cdid", "%");
  175. model.makeValue("/root/send/reqData/cdnm", "%");
  176. // submit("TRRSC06302");
  177. submit("TRRSS01211");
  178. model.removeNodeset("/root/main/csrtmlist");
  179. grd_csrtmlist.refresh();
  180. }
  181. function fChngReqPosTm() {
  182. var tempClotm;
  183. var tempReqImposTm;
  184. var clotm;
  185. var stdCnt = 0; //평일
  186. var spclCnt = 0; //휴일
  187. var spclCnt2 = 0; //토요일
  188. var spclCnt3 = 0; //일요일
  189. var daykind;
  190. for(var i = 1; i <= grd_csrtmlist.rows- 1; i++) {
  191. daykind = grd_csrtmlist.valueMatrix(i, grd_csrtmlist.colRef("daykind"));
  192. switch(daykind) {
  193. case '1' :
  194. stdCnt++;
  195. break;
  196. case '2' :
  197. spclCnt++;
  198. break;
  199. case '3' :
  200. spclCnt2++;
  201. break;
  202. case '4' :
  203. spclCnt3++;
  204. break;
  205. }
  206. }
  207. for(var i = 1; i <= stdCnt + spclCnt + spclCnt2 + spclCnt3; i++) {
  208. tempClotm = grd_csrtmlist.valueMatrix(i, grd_csrtmlist.colRef("clotm"));
  209. tmpReqImposTm = grd_csrtmlist.valueMatrix(i, grd_csrtmlist.colRef("reqimpostm"));
  210. //평일에 등록된 수량중 마지막일때
  211. if(i == stdCnt) {
  212. grd_csrtmlist.valueMatrix(1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  213. clotm = grd_csrtmlist.valueMatrix(1, grd_csrtmlist.colRef("clotm"));
  214. grd_csrtmlist.valueMatrix(1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  215. } else if (i < stdCnt) { //평일에 등록된 수량일때
  216. grd_csrtmlist.valueMatrix(i+1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  217. clotm = grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("clotm"));
  218. grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  219. } else if(i == stdCnt + spclCnt) { //휴일에 등록된 수량중 마지막일때
  220. grd_csrtmlist.valueMatrix(stdCnt+1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  221. clotm = grd_csrtmlist.valueMatrix(stdCnt+1, grd_csrtmlist.colRef("clotm"));
  222. grd_csrtmlist.valueMatrix(stdCnt+1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  223. } else if(i > stdCnt && i < stdCnt + spclCnt) { //휴일에 등록된 수량일때
  224. grd_csrtmlist.valueMatrix(i+1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  225. clotm = grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("clotm"));
  226. grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  227. } else if(i == stdCnt + spclCnt + spclCnt2) { //토요일에 등록된 수량중 마지막일때.
  228. grd_csrtmlist.valueMatrix(stdCnt + spclCnt + 1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  229. clotm = grd_csrtmlist.valueMatrix(stdCnt + spclCnt + 1, grd_csrtmlist.colRef("clotm"));
  230. grd_csrtmlist.valueMatrix(stdCnt + spclCnt + 1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  231. } else if(i > stdCnt + spclCnt && i < stdCnt + spclCnt + spclCnt2) { //토요일에 등록된 수량일때.
  232. grd_csrtmlist.valueMatrix(i+1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  233. clotm = grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("clotm"));
  234. grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  235. } else if(i == stdCnt + spclCnt + spclCnt2 + spclCnt3) { //일요일에 등록된 수량중 마지막일때.
  236. grd_csrtmlist.valueMatrix(stdCnt + spclCnt + spclCnt2 + 1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  237. clotm = grd_csrtmlist.valueMatrix(stdCnt + spclCnt + spclCnt2 + 1, grd_csrtmlist.colRef("clotm"));
  238. grd_csrtmlist.valueMatrix(stdCnt + spclCnt + spclCnt2 + 1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  239. } else if(i > stdCnt + spclCnt + spclCnt2 && i < stdCnt + spclCnt + spclCnt2 + spclCnt3) { //일요일에 등록된 수량일때.
  240. grd_csrtmlist.valueMatrix(i+1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  241. clotm = grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("clotm"));
  242. grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  243. }
  244. }
  245. // for(var i = 1; i <= grd_csrtmlist.rows - 1; i++) {
  246. // tempClotm = grd_csrtmlist.valueMatrix(i, grd_csrtmlist.colRef("clotm"));
  247. //
  248. // tmpReqImposTm = grd_csrtmlist.valueMatrix(i, grd_csrtmlist.colRef("reqimpostm"));
  249. //
  250. // if(i != grd_csrtmlist.rows-1) {
  251. // grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  252. // } else {
  253. // grd_csrtmlist.valueMatrix(1, grd_csrtmlist.colRef("reqposfromtm")) = addTm(tempClotm, tmpReqImposTm) + "01";
  254. // }
  255. //
  256. // if(i == grd_csrtmlist.rows - 1) {
  257. // clotm = grd_csrtmlist.valueMatrix(1, grd_csrtmlist.colRef("clotm"));
  258. // } else {
  259. // clotm = grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("clotm"));
  260. // }
  261. //
  262. // if(i != grd_csrtmlist.rows-1) {
  263. // grd_csrtmlist.valueMatrix(i + 1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  264. // }else {
  265. // grd_csrtmlist.valueMatrix(1, grd_csrtmlist.colRef("reqpostotm")) = subTm(clotm) + "59";
  266. // }
  267. // }
  268. }
  269. function subTm(clotm) {
  270. var cloHour = clotm.substr(0,2);
  271. var cloTm = clotm.substr(2,2);
  272. var sumHour = Number(cloHour);
  273. var sumTm = Number(cloTm) - 1;
  274. var hr;
  275. var tm;
  276. if(sumTm == -1) {
  277. sumTm = 59;
  278. sumHour -= 1;
  279. }
  280. if(sumHour == -1) {
  281. sumHour = 23;
  282. }
  283. if(sumHour < 10) {
  284. hr= "0" + sumHour;
  285. } else {
  286. hr = String(sumHour);
  287. }
  288. if(sumTm < 10) {
  289. tm = "0" + sumTm;
  290. } else {
  291. tm = String(sumTm);
  292. }
  293. return hr + tm;
  294. }
  295. function addTm(fstTm, lastTm) {
  296. var fstHour = fstTm.substr(0,2);
  297. var fstTm = fstTm.substr(2,2);
  298. var lastHour = lastTm.substr(0,2);
  299. var lastTm = lastTm.substr(2,2);
  300. var sumHour = (Number(fstHour) + Number(lastHour));
  301. var sumTm = Number(fstTm) + Number(lastTm);
  302. var hour;
  303. var tm;
  304. if(sumTm >= 60) {
  305. sumHour += 1;
  306. sumTm %= 60;
  307. }
  308. if(sumHour >= 24) {
  309. sumHour %= 24;
  310. }
  311. if(sumHour < 10) {
  312. hour = "0" + sumHour;
  313. } else {
  314. hour = String(sumHour);
  315. }
  316. if(sumTm < 10) {
  317. tm = "0" + sumTm;
  318. } else {
  319. tm = String(sumTm);
  320. }
  321. return hour + tm
  322. }
  323. function fPrintRex() {
  324. model.makeNode("/root/send/report/csrtmlist");
  325. copyNodesetType("/root/send/report/csrtmlist", "/root/main/csrtmlist");
  326. exeReportPreview("RPRSC06302", "XMLSTR", "/root/send/report/csrtmlist");
  327. }
  328. ]]>
  329. </script>
  330. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  331. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  332. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  333. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  334. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  335. <script type="javascript" ev:event="xforms-ready">
  336. <![CDATA[
  337. fInitialize();
  338. btn_search.dispatch("DOMActivate");
  339. ]]>
  340. </script>
  341. <submission id="TRRSC06301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/csrtmlist"/>
  342. <submission id="TRRSC06302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqData" resultref="/root/main/csrreqdeptlist"/>
  343. <submission id="TXRSC06301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/temp"/>
  344. <submission id="TRRSS01211" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/csrreqdeptlist"/>
  345. </model>
  346. </xhtml:head>
  347. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  348. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  349. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">CSR 마감시간 관리</caption>
  350. </group>
  351. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  352. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  353. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  354. <caption id="cap_instcd" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">기관코드 :</caption>
  355. <line id="line13" class="line_4" style="x1:1000px; y1:5px; x2:1000px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  356. <caption id="cap_csrreqdeptcd" class="search_name" style="left:650px; top:10px; width:89px; height:17px; ">요일구분 :</caption>
  357. <button id="btn_search" class="btn1_letter2" style="left:1015px; top:8px; width:56px; height:22px; ">
  358. <caption>조회</caption>
  359. <script type="javascript" ev:event="DOMActivate">
  360. <![CDATA[
  361. if(!isRequiredControls("cmb_instcd")) return;
  362. getCsrDeptList();
  363. if(ipt_reqdeptcd.value == "" || curDept != 0) {
  364. grd_csrreqdeptlist.row = curDept;
  365. fsearch();
  366. }
  367. ]]>
  368. </script>
  369. </button>
  370. <select1 id="cmb_instcd" ref="/root/send/instcd" class="combo_s_essential" appearance="minimal" style="left:102px; top:8px; width:158px; height:19px; ">
  371. <choices>
  372. <itemset>
  373. <label/>
  374. <value/>
  375. </itemset>
  376. </choices>
  377. <script type="javascript" ev:event="xforms-value-changed">
  378. <![CDATA[
  379. btn_search.dispatch("DOMActivate");
  380. ]]>
  381. </script>
  382. </select1>
  383. <select1 id="rdo_daykind" ref="/root/init/daykind" appearance="full" cols="6" style="left:740px; top:8px; width:255px; height:19px; ">
  384. <choices>
  385. <item>
  386. <label>전체</label>
  387. <value/>
  388. </item>
  389. <item>
  390. <label>평일</label>
  391. <value>1</value>
  392. </item>
  393. <item>
  394. <label>휴일</label>
  395. <value>2</value>
  396. </item>
  397. <item>
  398. <label>토요일</label>
  399. <value>3</value>
  400. </item>
  401. <item>
  402. <label>일요일</label>
  403. <value>4</value>
  404. </item>
  405. </choices>
  406. <script type="javascript" ev:event="xforms-value-changed">
  407. <![CDATA[
  408. if(!isRequiredControls("cmb_instcd")) return;
  409. //btn_search.dispatch("DOMActivate");
  410. getCsrDeptList();
  411. fsearch();
  412. ]]>
  413. </script>
  414. </select1>
  415. <caption id="caption2" class="search_name" style="left:270px; top:10px; width:88px; height:17px; ">부 서 명 :</caption>
  416. <input id="ipt_reqdeptnm" ref="/root/send/deptnm" class="input_search" style="left:468px; top:8px; width:172px; height:19px; ">
  417. <script type="javascript" ev:event="xforms-value-changed">
  418. <![CDATA[
  419. misfValidationCheck("02", "", "deptcd,deptnm");
  420. model.refresh();
  421. ]]>
  422. </script>
  423. </input>
  424. <input id="ipt_reqdeptcd" ref="/root/send/deptcd" class="input_default" style="left:355px; top:8px; width:85px; height:19px; "/>
  425. <button id="btn_excel" class="btn1_letter2" style="left:1073px; top:8px; width:56px; height:22px; ">
  426. <caption>엑셀</caption>
  427. <script type="javascript" ev:event="DOMActivate">
  428. <![CDATA[
  429. var fileName = window.fileDialog("save", ",", false, "CSR마감시간등록", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  430. if (fileName != "")
  431. {
  432. grd_csrtmlist.saveExcel(fileName, "청구현황List");
  433. }
  434. ]]>
  435. </script>
  436. </button>
  437. <button id="btn_prt" class="btn1_letter2" style="left:1131px; top:8px; width:56px; height:22px; ">
  438. <caption>출력</caption>
  439. <script type="javascript" ev:event="DOMActivate">
  440. <![CDATA[
  441. fPrintRex();
  442. ]]>
  443. </script>
  444. </button>
  445. <button id="btn_reqdept" class="icon_search" style="left:445px; top:10px; width:16px; height:16px; ">
  446. <caption/>
  447. <script type="javascript" ev:event="DOMActivate">
  448. <![CDATA[
  449. modal("SPRSS01203");
  450. model.setValue(ipt_reqdeptcd.attribute("ref"), model.property("deptcd"));
  451. model.setValue(ipt_reqdeptnm.attribute("ref"), model.property("deptnm"));
  452. model.setValue(ipt_csrreqdeptcd2.attribute("ref"), model.property("csrreqdeptcd"));
  453. ipt_reqdeptcd.refresh();
  454. ipt_reqdeptnm.refresh();
  455. for(var i = 1; i <= grd_csrreqdeptlist.rows; i++) {
  456. if( grd_csrreqdeptlist.valueMatrix(i, grd_csrreqdeptlist.colRef("csrreqdeptcd")) == ipt_csrreqdeptcd2.value ) {
  457. grd_csrreqdeptlist.row = i;
  458. fsearch();
  459. curDept = grd_csrreqdeptlist.row;
  460. break;
  461. }
  462. }
  463. ]]>
  464. </script>
  465. </button>
  466. </group>
  467. <line id="line2" class="line_1" style="x1:226px; y1:74px; x2:1194px; y2:74px; "/>
  468. <caption id="caption8" class="tit_2" style="left:5px; top:59px; width:133px; height:13px; ">부서구분</caption>
  469. <button id="btn_grdadd" class="btn2_letter2" style="left:1062px; top:54px; width:42px; height:19px; ">
  470. <caption>추가</caption>
  471. <script type="javascript" ev:event="DOMActivate">
  472. <![CDATA[
  473. if(!isRequiredControls("cmb_instcd")) return;
  474. misfGridIUD(grd_csrtmlist, "A");
  475. var cur_row = grd_csrtmlist.row;
  476. //행추가를 누를시 기간코드 값을 자동으로 저장한다.
  477. model.setValue(grd_csrtmlist.attribute("nodeset")+"["+cur_row+"]/instcd",cmb_instcd.value);
  478. model.setValue(grd_csrtmlist.attribute("nodeset")+"["+cur_row+"]/bar", "~");
  479. model.setValue(grd_csrtmlist.attribute("nodeset")+"["+cur_row+"]/csrreqdeptcd", grd_csrreqdeptlist.valueMatrix(grd_csrreqdeptlist.row, grd_csrreqdeptlist.colRef("csrreqdeptcd")));
  480. model.setValue(grd_csrtmlist.attribute("nodeset")+"["+cur_row+"]/reqimpostm", "0000");
  481. model.setValue(grd_csrtmlist.attribute("nodeset")+"["+cur_row+"]/dinfaplyn", "Y");
  482. //행추가시에만 키값에 대한 input이 허용된다. 그외에는 key값을 수정할 수 없다.
  483. grd_csrtmlist.editCell()
  484. ]]>
  485. </script>
  486. </button>
  487. <button id="btn_grddel" class="btn5_letter2" style="left:1107px; top:54px; width:42px; height:19px; ">
  488. <caption>삭제</caption>
  489. <script type="javascript" ev:event="DOMActivate">
  490. <![CDATA[
  491. if(grd_csrtmlist.row > -1 && grd_csrtmlist.row >= grd_csrtmlist.fixedrows){
  492. var firstRow = grd_csrtmlist.selectedRow(0);
  493. var lastRow = grd_csrtmlist.selectedRow(grd_csrtmlist.selectedRows-1);
  494. for(var i = firstRow; i <= lastRow; i++) {
  495. if(grd_csrtmlist.rowStatus(i) == "1" || grd_csrtmlist.rowStatus(i) == "3") {
  496. grd_csrtmlist.deleteRow(i);
  497. } else {
  498. grd_csrtmlist.rowStatus(i) = "4";
  499. }
  500. }
  501. }
  502. ]]>
  503. </script>
  504. </button>
  505. <datagrid id="grd_csrtmlist" nodeset="/root/main/csrtmlist" class="datagrid2" caption="부서구분^요일구분^마감차수^마감시간^청구불가시간^청구가능시간^청구가능시간^청구가능시간^비고^멸균&#xA;허용^수정자ID^수정자^수정일자^최초등록일자^instcd^csrreqdeptnm" colsep="^" colwidth="80, 60, 60, 60, 80, 60, 17, 60, 167, 39, 70, 60, 80, 80, 100, 100, 100" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:225px; top:79px; width:970px; height:662px; ">
  506. <col class="input_essential" disabled="true" ref="csrreqdeptcd" type="combo" _key="true" style="text-align:center; ">
  507. <choices>
  508. <itemset nodeset="/root/main/csrreqdeptlist">
  509. <label ref="csrreqdeptnm"/>
  510. <value ref="csrreqdeptcd"/>
  511. </itemset>
  512. </choices>
  513. </col>
  514. <col class="input_essential" disabled="true" ref="daykind" type="combo" _key="true" style="text-align:center; ">
  515. <choices>
  516. <item>
  517. <label>평일</label>
  518. <value>1</value>
  519. </item>
  520. <item>
  521. <label>휴일</label>
  522. <value>2</value>
  523. </item>
  524. <item>
  525. <label>토요일</label>
  526. <value>3</value>
  527. </item>
  528. <item>
  529. <label>일요일</label>
  530. <value>4</value>
  531. </item>
  532. </choices>
  533. </col>
  534. <col class="input_essential" disabled="true" ref="reqseq" type="input" maxlength="1" _key="true" style="text-align:center; "/>
  535. <col ref="clotm" type="input" format="hh:nn" maxlength="4" validateformat="true" style="text-align:center; "/>
  536. <col ref="reqimpostm" type="input" format="hh:nn" style="text-align:center; "/>
  537. <col disabled="true" ref="reqposfromtm" format="hh:nn:ss" style="text-align:center; "/>
  538. <col ref="bar" style="text-align:center; "/>
  539. <col ref="reqpostotm" format="hh:nn:ss"/>
  540. <col ref="cmt" type="input" maxlength="96" style="text-align:left; "/>
  541. <col ref="dinfaplyn" type="combo">
  542. <choices>
  543. <item>
  544. <label>Y</label>
  545. <value>Y</value>
  546. </item>
  547. <item>
  548. <label>N</label>
  549. <value>N</value>
  550. </item>
  551. </choices>
  552. </col>
  553. <col disabled="true" ref="lastupdtrid" style="text-align:center; "/>
  554. <col disabled="true" ref="usernm" style="text-align:center; "/>
  555. <col disabled="true" ref="lastupdtdt" format="yyyy-mm-dd" style="text-align:center; "/>
  556. <col disabled="true" ref="fstrgstdt" format="yyyy-mm-dd" style="text-align:center; "/>
  557. <col ref="instcd" visibility="hidden"/>
  558. <col ref="csrreqdeptnm" visibility="hidden"/>
  559. <col ref="daykindnm" visibility="hidden"/>
  560. <script type="javascript" ev:event="xforms-value-changed">
  561. <![CDATA[
  562. if(grd_csrtmlist.rows > 1 && (grd_csrtmlist.col == grd_csrtmlist.colRef("clotm") || grd_csrtmlist.col == grd_csrtmlist.colRef("reqimpostm")) ) {
  563. fChngReqPosTm();
  564. }
  565. ]]>
  566. </script>
  567. <script type="javascript" ev:event="onendedit">
  568. <![CDATA[
  569. fCheckTime();
  570. ]]>
  571. </script>
  572. <script type="javascript" ev:event="onclick">
  573. <![CDATA[
  574. var stat = grd_csrtmlist.rowStatus(grd_csrtmlist.row);
  575. if(grd_csrtmlist.isCell(event.target) && grd_csrtmlist.mouseRow >= grd_csrtmlist.fixedrows){
  576. //
  577. //
  578. //
  579. // if(stat == 0) {
  580. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("clotm")) = true;
  581. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("reqimpostm")) = true;
  582. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("reqposfromtm")) = true;
  583. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("reqpostotm")) = true;
  584. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("cmt")) = true;
  585. //
  586. //
  587. //
  588. // } else if(stat == 2) {
  589. //
  590. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("clotm")) = false;
  591. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("reqimpostm")) = false;
  592. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("reqposfromtm")) = false;
  593. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("reqpostotm")) = false;
  594. // grd_csrtmlist.colDisabled(grd_csrtmlist.colRef("cmt")) = false;
  595. // }
  596. }
  597. grd_csrtmlist.editCell();
  598. ]]>
  599. </script>
  600. </datagrid>
  601. <caption id="caption1" class="tit_2" style="left:225px; top:59px; width:133px; height:13px; ">마감 기준시간 등록</caption>
  602. <line id="line1" class="line_1" style="x1:5px; y1:74px; x2:220px; y2:74px; "/>
  603. <datagrid id="grd_csrreqdeptlist" nodeset="/root/main/csrreqdeptlist" caption="부서구분^caption1" colsep="^" colwidth="196, 100" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:5px; top:79px; width:215px; height:662px; ">
  604. <col class="input_essential" disabled="true" ref="csrreqdeptnm" type="output"/>
  605. <col ref="csrreqdeptcd" visibility="hidden"/>
  606. <script type="javascript" ev:event="onclick">
  607. <![CDATA[
  608. if(grd_csrreqdeptlist.isCell(event.target) && grd_csrreqdeptlist.mouseRow >= grd_csrreqdeptlist.fixedrows){
  609. fsearch();
  610. curDept = grd_csrreqdeptlist.row;
  611. }
  612. ]]>
  613. </script>
  614. <script type="javascript" ev:event="onrowchanged">
  615. <![CDATA[
  616. model.setValue(ipt_reqdeptcd.attribute("ref"), "");
  617. model.setValue(ipt_reqdeptnm.attribute("ref"), "");
  618. ipt_reqdeptcd.refresh();
  619. ipt_reqdeptnm.refresh();
  620. ]]>
  621. </script>
  622. </datagrid>
  623. <input id="ipt_csrreqdeptcd2" ref="/root/send/csrreqdeptcd2" visibility="hidden" style="left:525px; top:50px; width:100px; height:20px; "/>
  624. <button id="button1" class="btn2_letter3" style="left:1007px; top:54px; width:53px; height:19px; ">
  625. <caption>초기화</caption>
  626. <script type="javascript" ev:event="DOMActivate">
  627. <![CDATA[
  628. fInitialize();
  629. ]]>
  630. </script>
  631. </button>
  632. <button id="btn_save" class="btn5_letter2" style="left:1152px; top:54px; width:42px; height:19px; ">
  633. <caption>저장</caption>
  634. <script type="javascript" ev:event="DOMActivate">
  635. <![CDATA[
  636. fsave();
  637. ]]>
  638. </script>
  639. </button>
  640. </group>
  641. </xhtml:body>
  642. </xhtml:html>