SMMNG00500_CSR 마감 시간 등록.xrw 27 KB

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